diff --git a/src/Autopilot/route_mgr.cxx b/src/Autopilot/route_mgr.cxx index 39778e393..dedb68aaa 100644 --- a/src/Autopilot/route_mgr.cxx +++ b/src/Autopilot/route_mgr.cxx @@ -41,11 +41,7 @@ #include #include #include -#include - -#include #include -#include #include #include "Main/fg_props.hxx" @@ -54,12 +50,11 @@ #include #include "Airports/simple.hxx" #include "Airports/runways.hxx" - -#define RM "/autopilot/route-manager/" - #include #include +#define RM "/autopilot/route-manager/" + using namespace flightgear; static bool commandLoadFlightPlan(const SGPropertyNode* arg) @@ -557,7 +552,7 @@ int FGRouteMgr::numLegs() const void FGRouteMgr::setETAPropertyFromDistance(SGPropertyNode_ptr aProp, double aDistance) { - double speed = fgGetDouble("/velocities/groundspeed-kt", 0.0); + double speed = groundSpeed->getDoubleValue(); if (speed < 1.0) { aProp->setStringValue("--:--"); return;