]> git.mxchange.org Git - flightgear.git/blobdiff - src/Traffic/SchedFlight.cxx
Merge branch 'durk/traffic' into next
[flightgear.git] / src / Traffic / SchedFlight.cxx
index 0fad5b88d7af7fd7f47d032661361bcd80ae47f5..40d237b43e68fae957a8a0c76276fb555022f80c 100644 (file)
 #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>
@@ -271,13 +267,13 @@ 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);
       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);