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.
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;
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);
// 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; }
bool GetCrosswindConstraint(double& cpos);
bool GetDownwindConstraint(double& dpos);
bool GetBaseConstraint(double& bpos);
+
+ string GenText(const string& m, int c);
private:
FGATCMgr* ATCmgr;