]> git.mxchange.org Git - flightgear.git/blobdiff - src/Traffic/Schedule.hxx
Clean fg_init.hxx
[flightgear.git] / src / Traffic / Schedule.hxx
index 5511a7d1a258e01534376b99b7efbda037c47255..75661bceb5fe51dae5205b2b418d7dde39ad6f68 100644 (file)
@@ -48,17 +48,23 @@ class FGAISchedule
   string currentDestination;
   bool heavy;
   FGScheduledFlightVec flights;
-  float lat;
-  float lon; 
+  SGGeod position;
   double radius;
   double groundOffset;
   double distanceToUser;
   int AIManagerRef;
   //int score;
   bool firstRun;
-  
-
+  double courseToDest;
 
+  void scheduleFlights();
+  
+  /**
+   * Transition this schedule from distant mode to AI mode;
+   * create the AIAircraft (and flight plan) and register with the AIManager
+   */
+  bool createAIAircraft(FGScheduledFlight* flight, double speedKnots, time_t deptime);
+  
  public:
   FGAISchedule();                                           // constructor
   FGAISchedule(string model, 
@@ -79,7 +85,7 @@ class FGAISchedule
 
   ~FGAISchedule(); //destructor
 
-  bool update(time_t now);
+  bool update(time_t now, const SGVec3d& userCart);
   bool init();
 
   double getSpeed         ();
@@ -100,6 +106,7 @@ class FGAISchedule
   const string& getRegistration   () { return registration;};
   const string& getFlightRules    () { return (*flights.begin())->getFlightRules (); };
   bool getHeavy                   () { return heavy; };
+  double getCourse                () { return courseToDest; };
   FGScheduledFlight*findAvailableFlight (const string &currentDestination, const string &req);
   // used to sort in decending order of score: I've probably found a better way to
   // decending order sorting, but still need to test that.