]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/tower.hxx
Multiplayer client/server system -- MessageBuf class and test harness complete
[flightgear.git] / src / ATC / tower.hxx
index ace19d982c2d0d6798d9b637bbb89240cbde3694..f06faeb56455c0eeab74e4844c4ae750bea3647b 100644 (file)
@@ -54,8 +54,13 @@ enum tower_traffic_type {
 ostream& operator << (ostream& os, tower_traffic_type ttt);
 
 enum tower_callback_type {
-       USER_REQUEST_DEPARTURE = 1,
-       USER_REQUEST_ARRIVAL = 2
+       USER_REQUEST_VFR_DEPARTURE = 1,
+       USER_REQUEST_VFR_ARRIVAL = 2,
+       USER_REQUEST_VFR_ARRIVAL_FULL_STOP = 3,
+       USER_REQUEST_VFR_ARRIVAL_TOUCH_AND_GO = 4,
+       USER_REPORT_3_MILE_FINAL = 5,
+       USER_REPORT_DOWNWIND = 6,
+       USER_REPORT_RWY_VACATED = 7
 };
 
 // TODO - need some differentiation of IFR and VFR traffic in order to give the former priority.
@@ -87,9 +92,14 @@ public:
        bool longFinalAcknowledged;
        bool finalReported;
        bool finalAcknowledged;
+       bool rwyVacatedReported;
+       bool rwyVacatedAcknowledged;
        bool instructedToGoAround;      // set true if 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
+       
+       bool vfrArrivalReported;
+       bool vfrArrivalAcknowledged;
 
        // Type of operation the plane is doing
        tower_traffic_type opType;
@@ -121,7 +131,11 @@ public:
        
        void ReceiveUserCallback(int code);
 
-       void RequestLandingClearance(string ID);
+       // Contact tower for VFR approach
+       // eg "Cessna Charlie Foxtrot Golf Foxtrot Sierra eight miles South of the airport for full stop with Bravo"
+       // This function probably only called via user interaction - AI planes will have an overloaded function taking a planerec.
+       void VFRArrivalContact(string ID, LandingType opt = AIP_LT_UNKNOWN);
+       
        void RequestDepartureClearance(string ID);      
        void ReportFinal(string ID);
        void ReportLongFinal(string ID);
@@ -144,6 +158,8 @@ public:
        // in the future and consider multi-runway use, airplane weight etc.
        inline string GetActiveRunway() { return activeRwy; }
        inline RunwayDetails GetActiveRunwayDetails() { return rwy; }
+       // Get the pattern direction of the active rwy.
+       inline int GetPatternDirection() { return rwy.patternDirection; }
        
        inline void SetDisplay() { display = true; }
        inline void SetNoDisplay() { display = false; }
@@ -158,6 +174,8 @@ public:
        bool GetCrosswindConstraint(double& cpos);
        bool GetDownwindConstraint(double& dpos);
        bool GetBaseConstraint(double& bpos);
+       
+       string GenText(const string& m, int c);
 
 private:
        FGATCMgr* ATCmgr;