]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlan.cxx
model paging patch from Till Busch
[flightgear.git] / src / AIModel / AIFlightPlan.cxx
index 693b7d22ba70357f877f46edcac2fdb89c106b28..48af6afb81ae5d916a88ce3b3e808bf7be0dad98 100644 (file)
@@ -78,7 +78,8 @@ FGAIFlightPlan::FGAIFlightPlan(const string& filename)
      wpt->gear_down = wpt_node->getBoolValue("gear-down", false);
      wpt->flaps_down= wpt_node->getBoolValue("flaps-down", false);
      wpt->on_ground = wpt_node->getBoolValue("on-ground", false);
-     wpt->wait_time = wpt_node->getDoubleValue("wait-time-sec", 0);
+     wpt->time_sec   = wpt_node->getDoubleValue("time-sec", 0);
+     wpt->time       = wpt_node->getStringValue("time", "");
 
      if (wpt->name == "END") wpt->finished = true;
      else wpt->finished = false;
@@ -191,8 +192,8 @@ FGAIFlightPlan::FGAIFlightPlan(const std::string& p,
        leg = 4;
       else if (timeDiff >= 2000)
        leg = 5;
-      
-      //cerr << "Set leg to : " << leg << endl;  
+
+      SG_LOG(SG_GENERAL, SG_INFO, "Route from " << dep->getId() << " to " << arr->getId() << ". Set leg to : " << leg);
       wpt_iterator = waypoints.begin();
       create(dep,arr, leg, alt, speed, lat, lon,
             firstLeg, radius, fltType, acType, airline);
@@ -297,8 +298,7 @@ FGAIFlightPlan::FGAIFlightPlan(const std::string& p,
 FGAIFlightPlan::~FGAIFlightPlan()
 {
   deleteWaypoints();
-  if (taxiRoute)
-    delete taxiRoute;
+  delete taxiRoute;
 }
 
 
@@ -348,6 +348,7 @@ void FGAIFlightPlan::IncrementWaypoint(bool eraseWaypoints )
     }
   else
     wpt_iterator++;
+
 }
 
 // gives distance in feet from a position to a waypoint
@@ -490,8 +491,7 @@ void FGAIFlightPlan::restart()
 
 void FGAIFlightPlan::deleteTaxiRoute() 
 {
-  if (taxiRoute)
-    delete taxiRoute;
+  delete taxiRoute;
   taxiRoute = 0;
 }