#include "dynamics.hxx"
FGAirportDynamics::FGAirportDynamics(FGAirport * ap):
- _ap(ap), rwyPrefs(ap), SIDs(ap),startupController(this)
-_ap(ap), rwyPrefs(ap), SIDs(ap),
++ _ap(ap), rwyPrefs(ap), SIDs(ap),
+ atisSequenceIndex(-1),
+ atisSequenceTimeStamp(0.0)
++ startupController(this);
{
lastUpdate = 0;
-
- // For testing only. This needs to be refined when we move ATIS functionality over.
- atisInformation = "Sierra";
- }
-
- // Note that the ground network should also be copied
- FGAirportDynamics::
- FGAirportDynamics(const FGAirportDynamics & other):rwyPrefs(other.
- rwyPrefs),
- SIDs(other.SIDs), startupController(other.startupController)
- {
- for (FGParkingVecConstIterator ip = other.parkings.begin();
- ip != other.parkings.end(); ip++)
- parkings.push_back(*(ip));
- // rwyPrefs = other.rwyPrefs;
- lastUpdate = other.lastUpdate;
-
- stringVecConstIterator il;
- for (il = other.landing.begin(); il != other.landing.end(); il++)
- landing.push_back(*il);
- for (il = other.takeoff.begin(); il != other.takeoff.end(); il++)
- takeoff.push_back(*il);
- lastUpdate = other.lastUpdate;
- atisInformation = other.atisInformation;
}
// Destructor
intVec freqTower; // </TOWER>
intVec freqApproach; // </APPROACH>
++<<<<<<< HEAD:src/Airports/dynamics.hxx
+ string atisInformation;
+
+ string chooseRunwayFallback();
+ bool innerGetActiveRunway(const string &trafficType, int action, string &runway, double heading);
+ string chooseRwyByHeading(stringVec rwys, double heading);
+
+ double elevation;
+
++=======
+ int atisSequenceIndex;
+ double atisSequenceTimeStamp;
+
+ std::string chooseRunwayFallback();
+ bool innerGetActiveRunway(const std::string &trafficType, int action, std::string &runway, double heading);
+ std::string chooseRwyByHeading(stringVec rwys, double heading);
++>>>>>>> next:src/Airports/dynamics.hxx
public:
FGAirportDynamics(FGAirport* ap);
- FGAirportDynamics(const FGAirportDynamics &other);
~FGAirportDynamics();
void addAwosFreq (int val) { freqAwos.push_back(val); };
FGTowerController *getTowerController() { return &towerController; };
FGApproachController *getApproachController() { return &approachController; };
- const string& getAtisInformation() { return atisInformation; };
- int getGroundFrequency (unsigned leg); //{ return freqGround.size() ? freqGround[0] : 0; };
+ int getGroundFrequency(unsigned leg);
+ int getTowerFrequency (unsigned nr);
+
+ /// get current ATIS sequence letter
+ const std::string getAtisSequence();
+
+ /// get the current ATIS sequence number, updating it if necessary
+ int updateAtisSequence(int interval, bool forceUpdate);
+
void setRwyUse(const FGRunwayPreference& ref);
};