]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/tower.hxx
I had hoped that gmtime's lack of thread-safety wouldn't bite us. It does.
[flightgear.git] / src / ATC / tower.hxx
index 78e43baa34204144d0e0b63ee0c598f6dcbd59b2..aaaf5387b8ace7e2c6454a15d1cfbb4ed429b28a 100644 (file)
@@ -95,7 +95,8 @@ public:
        bool finalAcknowledged;
        bool rwyVacatedReported;
        bool rwyVacatedAcknowledged;
-       bool instructedToGoAround;      // set true if told by tower to go around
+       bool goAroundReported;          // set true if plane informs tower that it's going around.
+       bool instructedToGoAround;      // set true if plane told by tower to go around.
        bool onRwy;             // is physically on the runway
        bool nextOnRwy;         // currently projected by tower to be the next on the runway
        
@@ -145,10 +146,10 @@ public:
        void ReportOuterMarker(string ID);
        void ReportMiddleMarker(string ID);
        void ReportInnerMarker(string ID);
-       void ReportGoingAround(string ID);
        void ReportRunwayVacated(string ID);
        void ReportReadyForDeparture(string ID);
        void ReportDownwind(string ID);
+       void ReportGoingAround(string ID);
        
        // Contact tower when at a hold short for departure - for now we'll assume plane - maybe vehicles might want to cross runway eventually?
        void ContactAtHoldShort(PlaneRec plane, FGAIPlane* requestee, tower_traffic_type operation);
@@ -167,9 +168,6 @@ public:
        // Get the pattern direction of the active rwy.
        inline int GetPatternDirection() { return rwy.patternDirection; }
        
-       inline void SetDisplay() { display = true; }
-       inline void SetNoDisplay() { display = false; }
-       
        inline string get_trans_ident() { return trans_ident; }
        
        inline FGGround* GetGroundPtr() { return ground; }
@@ -190,6 +188,7 @@ private:
        void Respond();
        
        void ProcessRunwayVacatedReport(TowerPlaneRec* t);
+       void ProcessDownwindReport(TowerPlaneRec* t);
        
        // Remove all options from the user dialog choice
        void RemoveAllUserDialogOptions();
@@ -246,9 +245,6 @@ private:
        unsigned int update_count;      // Convienince counter for speading computational load over several updates
        unsigned int update_count_max;  // ditto.
        
-       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.
-       
        double timeSinceLastDeparture;  // Time in seconds since last departure from active rwy.
        bool departed;  // set true when the above needs incrementing with time, false when it doesn't.
        
@@ -322,6 +318,9 @@ private:
        bool AddToTrafficList(TowerPlaneRec* t, bool holding = false);
        
        bool AddToCircuitList(TowerPlaneRec* t);
+       
+       // Add to vacated list only if not already present
+       void AddToVacatedList(TowerPlaneRec* t);
 
        // Ground can be separate or handled by tower in real life.
        // In the program we will always use a separate FGGround class, but we need to know