]> 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 75661bceb5fe51dae5205b2b418d7dde39ad6f68..a85d46df6be5aecbdfc7faff828f6a25b57e359e 100644 (file)
@@ -53,11 +53,17 @@ class FGAISchedule
   double groundOffset;
   double distanceToUser;
   int AIManagerRef;
-  //int score;
+  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;
@@ -85,6 +91,8 @@ class FGAISchedule
 
   ~FGAISchedule(); //destructor
 
+    static bool validModelPath(const std::string& model);
+    
   bool update(time_t now, const SGVec3d& userCart);
   bool init();
 
@@ -107,10 +115,23 @@ class FGAISchedule
   const string& getFlightRules    () { return (*flights.begin())->getFlightRules (); };
   bool getHeavy                   () { return heavy; };
   double getCourse                () { return courseToDest; };
-  FGScheduledFlight*findAvailableFlight (const string &currentDestination, const string &req);
+  unsigned int getRunCount        () { return runCount; };
+  unsigned int getHits            () { return hits; };
+
+  void         setrunCount(unsigned int count) { runCount = count; };
+  void         setHits    (unsigned int count) { hits     = count; };
+  void         setScore   ();
+  double       getScore   () { return score; };
+  void         setHeading (); 
+  void         assign         (FGScheduledFlight *ref) { flights.push_back(ref); };
+  void         setFlightType  (string val            ) { flightType = val; };
+  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;};