X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAirports%2Fdynamics.hxx;h=1f142eb529bd36e9f0d0477e4ea382ec6d49f9a9;hb=386aefe69358ce41a11c9afeb8f56e26758fe56b;hp=f6e344932758447a2af8a60635ea2b64efd416aa;hpb=17c42deae16610939d598a0dabe28d2d4d362469;p=flightgear.git diff --git a/src/Airports/dynamics.hxx b/src/Airports/dynamics.hxx index f6e344932..1f142eb52 100644 --- a/src/Airports/dynamics.hxx +++ b/src/Airports/dynamics.hxx @@ -33,6 +33,7 @@ #include "parking.hxx" #include "groundnetwork.hxx" #include "runwayprefs.hxx" +#include "sidstar.hxx" //typedef vector DoubleVec; //typedef vector::iterator DoubleVecIterator; @@ -47,6 +48,7 @@ private: FGParkingVec parkings; FGRunwayPreference rwyPrefs; + FGSidStar SIDs; FGStartupController startupController; FGGroundNetwork groundNetwork; FGTowerController towerController; @@ -64,15 +66,11 @@ private: intVec freqTower; // intVec freqApproach; // - // Experimental keep a running average of wind dir and speed to prevent - // Erratic runway changes. - // Note: I should add these to the copy constructor and assigment operator to be - // constistent - //double avWindHeading [10]; - //double avWindSpeed [10]; + string atisInformation; string chooseRunwayFallback(); - + bool innerGetActiveRunway(const string &trafficType, int action, string &runway, double heading); + string chooseRwyByHeading(stringVec rwys, double heading); public: FGAirportDynamics(FGAirport* ap); FGAirportDynamics(const FGAirportDynamics &other); @@ -93,7 +91,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, @@ -107,13 +105,19 @@ public: //FGAirport *getAddress() { return this; }; //const string &getName() const { return _name;}; // Returns degrees - int getGroundFrequency() { return freqGround.size() ? freqGround[0] : 0; }; + // 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; }; - + const string& getAtisInformation() { return atisInformation; }; + int getGroundFrequency(unsigned leg); //{ return freqGround.size() ? freqGround[0] : 0; }; void setRwyUse(const FGRunwayPreference& ref); };