]> git.mxchange.org Git - flightgear.git/commitdiff
Remove stale includes, use local ground-speed property.
authorJames Turner <zakalawe@mac.com>
Fri, 11 May 2012 16:07:21 +0000 (17:07 +0100)
committerJames Turner <zakalawe@mac.com>
Fri, 11 May 2012 16:07:21 +0000 (17:07 +0100)
src/Autopilot/route_mgr.cxx

index 39778e3931ae69bd36d47ab2b6ba77afb473b971..dedb68aaa15814ef5b786e669b0494e3c264862f 100644 (file)
 #include <simgear/misc/strutils.hxx>
 #include <simgear/structure/exception.hxx>
 #include <simgear/structure/commands.hxx>
-#include <simgear/misc/sgstream.hxx>
-
-#include <simgear/props/props_io.hxx>
 #include <simgear/misc/sg_path.hxx>
-#include <simgear/route/route.hxx>
 #include <simgear/sg_inlines.h>
 
 #include "Main/fg_props.hxx"
 #include <Navaids/procedure.hxx>
 #include "Airports/simple.hxx"
 #include "Airports/runways.hxx"
-
-#define RM "/autopilot/route-manager/"
-
 #include <GUI/new_gui.hxx>
 #include <GUI/dialog.hxx>
 
+#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;