]> git.mxchange.org Git - flightgear.git/blobdiff - src/Traffic/SchedFlight.cxx
Canvas: CSS like property value inheritance.
[flightgear.git] / src / Traffic / SchedFlight.cxx
index 0fad5b88d7af7fd7f47d032661361bcd80ae47f5..e04f1d8a4a3fcc3a6770eaa518ab56b0d8d741c1 100644 (file)
@@ -33,7 +33,6 @@
  *
  * TODO:
  * - Check the code for known portability issues
- * - Find an alternative for the depricated Point3D class
  *
  *****************************************************************************/
 
 #include <string>
 #include <vector>
 
-#include <plib/sg.h>
-
 #include <simgear/compiler.h>
-#include <simgear/math/polar3d.hxx>
-#include <simgear/math/sg_geodesy.hxx>
 #include <simgear/props/props.hxx>
-#include <simgear/route/waypoint.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
 #include <simgear/timing/sg_time.hxx>
 #include <simgear/xml/easyxml.hxx>
 
 FGScheduledFlight::FGScheduledFlight()
 {
-   initialized = false;
-   available = true;
+    departureTime  = 0;
+    arrivalTime    = 0;
+    cruiseAltitude = 0;
+    repeatPeriod   = 0;
+    initialized = false;
+    available = true;
 }
   
 FGScheduledFlight::FGScheduledFlight(const FGScheduledFlight &other)
@@ -271,16 +269,16 @@ FGAirport * FGScheduledFlight::getArrivalAirport  ()
 bool FGScheduledFlight::initializeAirports()
 {
   //cerr << "Initializing using : " << depId << " " << arrId << endl;
-  departurePort = globals->get_airports()->search(depId);
+  departurePort = FGAirport::findByIdent(depId);
   if(departurePort == NULL)
     {
-      SG_LOG( SG_GENERAL, SG_WARN, "Traffic manager could not find departure airport : " << depId);
+      SG_LOG( SG_GENERAL, SG_DEBUG, "Traffic manager could not find departure airport : " << depId);
       return false;
     }
-  arrivalPort = globals->get_airports()->search(arrId);
+  arrivalPort = FGAirport::findByIdent(arrId);
   if(arrivalPort == NULL)
     {
-      SG_LOG( SG_GENERAL, SG_WARN, "Traffic manager could not find arrival airport   : " << arrId);
+      SG_LOG( SG_GENERAL, SG_DEBUG, "Traffic manager could not find arrival airport   : " << arrId);
       return false;
     }