//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef _FG_GROUND_HXX
#define _FG_GROUND_HXX
-#include STL_IOSTREAM
-#include STL_STRING
-
-SG_USING_STD(string);
-SG_USING_STD(ios);
-
#include <map>
#include <vector>
#include <list>
+
#include <simgear/math/point3d.hxx>
#include <simgear/misc/sgstream.hxx>
#include <simgear/math/sg_geodesy.hxx>
+#include <simgear/props/props.hxx>
#include "ATC.hxx"
-//#include "ATCmgr.hxx"
#include "ATCProjection.hxx"
-#include "AIEntity.hxx"
-//#include "AILocalTraffic.hxx" // RunwayDetails - this is a temporary hack
+
+#include STL_IOSTREAM
+#include STL_STRING
+
+SG_USING_STD(string);
+SG_USING_STD(ios);
SG_USING_STD(map);
SG_USING_STD(vector);
SG_USING_STD(list);
+class FGAIEntity;
+class FGATCMgr;
+
//////////////////////////////////////////////////////
// Types for the logical network data structure
enum arc_type {
public:
FGGround();
- FGGround(string id);
+ FGGround(const string& id);
~FGGround();
void Init();
void Update(double dt);
- inline string get_trans_ident() { return trans_ident; }
- inline void SetDisplay() {display = true;}
- inline void SetNoDisplay() {display = false;}
+ inline const string& get_trans_ident() { return trans_ident; }
// Contact ground control on arrival, assumed to request any gate
//void NewArrival(plane_rec plane);
// Contact ground control on departure, assumed to request currently active runway.
- void RequestDeparture(PlaneRec plane, FGAIEntity* requestee);
+ void RequestDeparture(const PlaneRec& plane, FGAIEntity* requestee);
// Contact ground control when the calling routine doesn't know if arrival
// or departure is appropriate.
Gate* GetGateNode();
// Return a pointer to a hold short node
- node* GetHoldShortNode(string rwyID);
+ node* GetHoldShortNode(const string& rwyID);
// Runway stuff - this might change in the future.
// Get a list of exits from a given runway
// It is up to the calling function to check for non-zero size of returned array before use
- node_array_type GetExits(string rwyID);
+ node_array_type GetExits(const string& rwyID);
// Get a path from one node to another
ground_network_path_type GetPath(node* A, node* B);
// Get a path from a node to a runway threshold
- ground_network_path_type GetPath(node* A, string rwyID);
+ ground_network_path_type GetPath(node* A, const string& rwyID);
// Get a path from a node to a runway hold short point
// Bit of a hack this at the moment!
- ground_network_path_type GetPathToHoldShort(node* A, string rwyID);
+ ground_network_path_type GetPathToHoldShort(node* A, const string& rwyID);
private:
FGATCMgr* ATCmgr;
//NextClearance(ground_rec &g);
// environment - need to make sure we're getting the surface winds and not winds aloft.
- SGPropertyNode* wind_from_hdg; //degrees
- SGPropertyNode* wind_speed_knots; //knots
+ SGPropertyNode_ptr wind_from_hdg; //degrees
+ SGPropertyNode_ptr wind_speed_knots; //knots
- bool display; // Flag to indicate whether we should be outputting to the ATC display.
- bool displaying; // Flag to indicate whether we are outputting to the ATC display.
// for failure modeling
string trans_ident; // transmitted ident
bool ground_failed; // ground failed?
// Return a pointer to the node at a runway threshold
// Returns NULL if unsuccessful.
- node* GetThresholdNode(string rwyID);
+ node* GetThresholdNode(const string& rwyID);
// A shortest path algorithm from memory (I can't find the bl&*dy book again!)
ground_network_path_type GetShortestPath(node* A, node* B);