]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/trafficcontrol.hxx
- Added ultra-light traffic is now a separate traffic class that can have its
[flightgear.git] / src / Airports / trafficcontrol.hxx
index e0329a569d71d5c4b8ac46d85d9121bea67f1126..be687d16da9eb4711ea577aee519aa4685517dd2 100644 (file)
@@ -58,6 +58,7 @@ private:
   bool changeSpeed;
   bool changeHeading;
   bool changeAltitude;
+  bool resolveCircularWait;
 
   double speed;
   double heading;
@@ -76,19 +77,23 @@ public:
   double getHeading     () { return heading; };
   double getAlt         () { return alt; };
 
+  bool getCheckForCircularWait() { return resolveCircularWait; };
+
   void setHoldPattern   (bool val) { holdPattern    = val; };
   void setHoldPosition  (bool val) { holdPosition   = val; };
   void setChangeSpeed   (bool val) { changeSpeed    = val; };
   void setChangeHeading (bool val) { changeHeading  = val; };
   void setChangeAltitude(bool val) { changeAltitude = val; };
 
+  void setResolveCircularWait (bool val) { resolveCircularWait = val; }; 
+
   void setSpeed       (double val) { speed   = val; };
   void setHeading     (double val) { heading = val; };
   void setAlt         (double val) { alt     = val; };
 };
 
 
-/**************************************************************************************
+/**
  * class FGATCController
  * NOTE: this class serves as an abstraction layer for all sorts of ATC controller. 
  *************************************************************************************/
@@ -101,7 +106,8 @@ public:
   virtual ~FGATCController() {};
   virtual void announcePosition(int id, FGAIFlightPlan *intendedRoute, int currentRoute,
                                double lat, double lon,
-                               double hdg, double spd, double alt, double radius, int leg) = 0;
+                               double hdg, double spd, double alt, double radius, int leg,
+                               string callsign) = 0;
   virtual void             signOff(int id) = 0;
   virtual void             update(int id, double lat, double lon, 
                                  double heading, double speed, double alt, double dt) = 0;
@@ -126,10 +132,11 @@ private:
   FGATCInstruction instruction;
   double latitude, longitude, heading, speed, altitude, radius;
   string runway;
+  string callsign;
   
   
 public:
-  FGTrafficRecord() {};
+  FGTrafficRecord();
   
   void setId(int val)  { id = val; };
   void setRadius(double rad) { radius = rad;};
@@ -144,6 +151,8 @@ public:
   int  crosses                   (FGGroundNetwork *, FGTrafficRecord &other); 
   bool isOpposing                (FGGroundNetwork *, FGTrafficRecord &other, int node);
 
+  bool onRoute(FGGroundNetwork *, FGTrafficRecord &other);
+
   bool getSpeedAdjustment() { return instruction.getChangeSpeed(); };
   
   double getLatitude () { return latitude ; };
@@ -166,8 +175,12 @@ public:
 
   void setWaitsForId(int id) { waitsForId = id; };
 
-  string getRunway() { return runway; };
+  void setResolveCircularWait()   { instruction.setResolveCircularWait(true);  };
+  void clearResolveCircularWait() { instruction.setResolveCircularWait(false); };
 
+  string getRunway() { return runway; };
+  void setCallSign(string clsgn) { callsign = clsgn; };
+  string getCallSign() { return callsign; };
 };
 
 typedef vector<FGTrafficRecord> TrafficVector;
@@ -206,7 +219,8 @@ public:
   virtual ~FGTowerController() {};
   virtual void announcePosition(int id, FGAIFlightPlan *intendedRoute, int currentRoute,
                                double lat, double lon,
-                               double hdg, double spd, double alt, double radius, int leg);
+                               double hdg, double spd, double alt, double radius, int leg,
+                               string callsign);
   virtual void             signOff(int id);
   virtual void             update(int id, double lat, double lon, 
                                  double heading, double speed, double alt, double dt);