]> git.mxchange.org Git - flightgear.git/blobdiff - src/Traffic/Schedule.hxx
Canvas: Add new element type map for geo mapping.
[flightgear.git] / src / Traffic / Schedule.hxx
index 92b7e78aa0efb8ea55c4221b612bd653935e99c6..a85d46df6be5aecbdfc7faff828f6a25b57e359e 100644 (file)
@@ -56,11 +56,14 @@ class FGAISchedule
   double score;
   unsigned int runCount;
   unsigned int hits;
+  unsigned int lastRun;
   bool firstRun;
   double courseToDest;
   bool initialized;
+  bool valid;
 
-  void scheduleFlights();
+  void scheduleFlights(time_t now);
+  int groundTimeFromRadius();
   
   /**
    * Transition this schedule from distant mode to AI mode;
@@ -88,6 +91,8 @@ class FGAISchedule
 
   ~FGAISchedule(); //destructor
 
+    static bool validModelPath(const std::string& model);
+    
   bool update(time_t now, const SGVec3d& userCart);
   bool init();
 
@@ -120,10 +125,13 @@ class FGAISchedule
   void         setHeading (); 
   void         assign         (FGScheduledFlight *ref) { flights.push_back(ref); };
   void         setFlightType  (string val            ) { flightType = val; };
-  FGScheduledFlight*findAvailableFlight (const string &currentDestination, const string &req);
+  FGScheduledFlight*findAvailableFlight (const string &currentDestination, const string &req, time_t min=0, time_t max=0);
   // 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.
-  bool operator< (const FGAISchedule &other) const { return (score > other.score); };
+  bool operator< (const FGAISchedule &other) const;
+    void taint() { valid = false; };
+    int getLastUsed() { return lastRun; };
+    void setLastUsed(unsigned int val) {lastRun = val; }; 
   //void * getAiRef                 () { return AIManagerRef; };
   //FGAISchedule* getAddress        () { return this;};