]> git.mxchange.org Git - flightgear.git/blobdiff - src/Traffic/SchedFlight.cxx
New traffic manager initialization. Search for all files
[flightgear.git] / src / Traffic / SchedFlight.cxx
index dc44c53b6b2f952a372cf6866b2fbc54389e08d0..a66915a1e0831069d2772ada688ab00c2560bef9 100644 (file)
@@ -174,6 +174,7 @@ time_t FGScheduledFlight::processTimeString(const string& theTime)
     {
       timeOffsetInDays = 0;
     }
+  // TODO: verify status of each token.
   targetHour   = atoi(timeCopy.substr(0,2).c_str());
   targetMinute = atoi(timeCopy.substr(3,5).c_str());
   targetSecond = atoi(timeCopy.substr(6,8).c_str());
@@ -264,13 +265,13 @@ bool FGScheduledFlight::initializeAirports()
   departurePort = globals->get_airports()->search(depId);
   if(departurePort == NULL)
     {
-      cerr << "Could not find " << depId << endl; 
+      SG_LOG( SG_GENERAL, SG_WARN, "Traffic manager could not find departure airport : " << depId);
       return false;
     }
   arrivalPort = globals->get_airports()->search(arrId);
   if(arrivalPort == NULL)
     {
-      cerr << "Could not find " << arrId << endl;
+      SG_LOG( SG_GENERAL, SG_WARN, "Traffic manager could not find arrival airport   : " << arrId);
       return false;
     }
 
@@ -279,3 +280,9 @@ bool FGScheduledFlight::initializeAirports()
   initialized = true;
   return true;
 }
+
+
+bool compareScheduledFlights(FGScheduledFlight *a, FGScheduledFlight *b) 
+{ 
+  return (*a) < (*b); 
+};