X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATC%2Fground.hxx;h=b0cf1f3d86fbe0fc89eaf5b8af1d4548a54cd675;hb=4606f96e139204d5b2d76ee93c3b0c66885b5f5f;hp=4ec09fca83bda6b5e49eb7d0b76f4afdbab352c0;hpb=7fc214fab368bd007986b3990b4f14360670ea5d;p=flightgear.git diff --git a/src/ATC/ground.hxx b/src/ATC/ground.hxx index 4ec09fca8..b0cf1f3d8 100644 --- a/src/ATC/ground.hxx +++ b/src/ATC/ground.hxx @@ -211,13 +211,9 @@ struct GRunwayDetails { Point3D threshold_pos; Point3D end1ortho; // ortho projection end1 (the threshold ATM) Point3D end2ortho; // ortho projection end2 (the take off end in the current hardwired scheme) - double mag_hdg; - double mag_var; double hdg; // true runway heading double length; // In *METERS* - int ID; // 1 -> 36 string rwyID; - // Do we really need *both* the last two?? }; /////////////////////////////////////////////////////////////////////////////// @@ -236,7 +232,6 @@ public: void Update(double dt); inline string get_trans_ident() { return trans_ident; } - inline atc_type GetType() { return GROUND; } inline void SetDisplay() {display = true;} inline void SetNoDisplay() {display = false;} @@ -262,6 +257,9 @@ public: // Return a pointer to an unused gate Gate* GetGateNode(); + // Return a pointer to a hold short node + node* GetHoldShortNode(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 @@ -278,8 +276,9 @@ public: ground_network_path_type GetPathToHoldShort(node* A, string rwyID); private: - // Tower stuff - + FGATCMgr* ATCmgr; + // This is purely for synactic convienience to avoid writing globals->get_ATC_mgr()-> all through the code! + // Need a data structure to hold details of the various active planes // Need a data structure to hold details of the logical network // including which gates are filled - or possibly another data structure @@ -295,10 +294,6 @@ private: // A map of all the gates indexed against internal (FGFS) ID gate_map_type gates; gate_map_iterator gatesItr; - - // Runway stuff - this might change in the future. - //runway_array_type runways; // STL way - Rwy runways[36]; // quick hack! FGATCAlignedProjection ortho; @@ -314,6 +309,10 @@ private: // Generate the next clearance for an airplane //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 + 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 @@ -321,6 +320,25 @@ private: bool ground_failed; // ground failed? bool networkLoadOK; // Indicates whether LoadNetwork returned true or false at last attempt + // Tower control + bool untowered; // True if this is an untowered airport (we still need the ground class for shortest path implementation etc + //FGATC* tower; // Pointer to the tower control + + // Logical runway details - this might change in the future. + //runway_array_type runways; // STL way + Rwy runways[37]; // quick hack! + + // Physical runway details + double aptElev; // Airport elevation + string activeRwy; // Active runway number - For now we'll disregard multiple / alternate runway operation. + RunwayDetails rwy; // Assumed to be the active one for now.// Figure out which runways are active. + + // For now we'll just be simple and do one active runway - eventually this will get much more complex + // Copied from FGTower - TODO - it would be better to implement this just once, and have ground call tower + // for runway operation details, but at the moment we can't guarantee that tower control at a given airport + // will be initialised before ground so we can't do that. + void DoRwyDetails(); + // Load the logical ground network for this airport from file. // Return true if successfull. bool LoadNetwork();