]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/dynamics.hxx
Merge branch 'next' into durk-atc
[flightgear.git] / src / Airports / dynamics.hxx
index 9712c5b8059c8be5262f317d3df1e63e5bb919e4..1aa61fe6fcc4cc5695f7b7d4d478bcf445b32752 100644 (file)
@@ -33,6 +33,7 @@
 #include "parking.hxx"
 #include "groundnetwork.hxx"
 #include "runwayprefs.hxx"
+#include "sidstar.hxx"
 
 //typedef vector<float> DoubleVec;
 //typedef vector<float>::iterator DoubleVecIterator;
@@ -45,11 +46,13 @@ class FGAirportDynamics {
 private:
   FGAirport* _ap;
 
-  FGParkingVec        parkings;
-  FGRunwayPreference  rwyPrefs;
-  FGStartupController startupController;
-  FGGroundNetwork     groundNetwork;
-  FGTowerController   towerController;
+  FGParkingVec         parkings;
+  FGRunwayPreference   rwyPrefs;
+  FGSidStar            SIDs;
+  FGStartupController  startupController;
+  FGGroundNetwork      groundNetwork;
+  FGTowerController    towerController;
+  FGApproachController approachController;
 
   time_t lastUpdate;
   string prevTrafficType;
@@ -67,7 +70,11 @@ private:
   string atisInformation;
 
   string chooseRunwayFallback();
-  bool innerGetActiveRunway(const string &trafficType, int action, string &runway);
+  bool innerGetActiveRunway(const string &trafficType, int action, string &runway, double heading);
+  string chooseRwyByHeading(stringVec rwys, double heading);
+
+    double elevation;
+
 public:
   FGAirportDynamics(FGAirport* ap);
   FGAirportDynamics(const FGAirportDynamics &other);
@@ -88,7 +95,7 @@ public:
   double getElevation() const; 
   const string& getId() const; 
   
-  void getActiveRunway(const string& trafficType, int action, string& runway);
+  void getActiveRunway(const string& trafficType, int action, string& runway, double heading);
 
   void addParking(FGParking& park);
   bool getAvailableParking(double *lat, double *lon, 
@@ -103,15 +110,20 @@ public:
   //const string &getName() const { return _name;};
   // Returns degrees
 
+  // Departure / Arrival procedures
+  FGSidStar * getSIDs() { return &SIDs; };
+  FGAIFlightPlan * getSID(string activeRunway, double heading);
+
 
   // ATC related functions. 
-  FGStartupController *getStartupController() { return &startupController; };
-  FGGroundNetwork     *getGroundNetwork()     { return &groundNetwork; };
-  FGTowerController   *getTowerController()   { return &towerController; };
+  FGStartupController    *getStartupController()    { return &startupController; };
+  FGGroundNetwork        *getGroundNetwork()        { return &groundNetwork; };
+  FGTowerController      *getTowerController()      { return &towerController; };
+  FGApproachController   *getApproachController()   { return &approachController; };
 
   const string& getAtisInformation() { return atisInformation; };
-  int getGroundFrequency(int leg); //{ return freqGround.size() ? freqGround[0] : 0; };
-
+  int getGroundFrequency (unsigned leg); //{ return freqGround.size() ? freqGround[0] : 0; };
+  int getTowerFrequency  (unsigned nr);
   void setRwyUse(const FGRunwayPreference& ref);
 };