From: Durk Talsma Date: Fri, 3 Jun 2011 07:31:04 +0000 (+0200) Subject: Merge branch 'next' into durk-atc X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=348ff2ec23298db4db3b3f2b12d301dec73ec8e1;p=flightgear.git Merge branch 'next' into durk-atc Merge with next. Conflicts: src/Airports/dynamics.cxx src/Airports/dynamics.hxx --- 348ff2ec23298db4db3b3f2b12d301dec73ec8e1 diff --cc src/Airports/dynamics.cxx index 398920f32,69f8c051d..9cbf9f6fa --- a/src/Airports/dynamics.cxx +++ b/src/Airports/dynamics.cxx @@@ -49,33 -50,11 +50,12 @@@ using std::random_shuffle #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 diff --cc src/Airports/dynamics.hxx index 1aa61fe6f,cf862054e..3240f0938 --- a/src/Airports/dynamics.hxx +++ b/src/Airports/dynamics.hxx @@@ -67,17 -58,14 +58,25 @@@ private intVec freqTower; // intVec freqApproach; // ++<<<<<<< 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); }; @@@ -121,9 -109,14 +120,15 @@@ 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); };