]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlanCreateCruise.cxx
Clear chat messages when an aircraft becomes inactive in the property tree.
[flightgear.git] / src / AIModel / AIFlightPlanCreateCruise.cxx
index 0af5ed1fa7385a7e68f4c31412500d97157ce6cb..7b6e68101ff9693529f21d844871e0162abc631e 100755 (executable)
@@ -75,15 +75,10 @@ void FGAIFlightPlan::evaluateRoutePart(double deplat,
            }
        }
       //cerr << "1"<< endl;
-      //SGGeoc geoc = SGGeoc::fromCart(SGVec3d(newPos[0], newPos[1], newPos[2]));
-
-      //double midlat = geoc.getLatitudeDeg();
-      //double midlon = geoc.getLongitudeDeg();
-
-      Point3D temp = sgCartToPolar3d(Point3D(newPos[0], newPos[1],newPos[2]));
-      double midlat = temp.lat() * SG_RADIANS_TO_DEGREES;
-      double midlon = temp.lon() * SG_RADIANS_TO_DEGREES; 
+      SGGeoc geoc = SGGeoc::fromCart(SGVec3d(newPos[0], newPos[1], newPos[2]));
 
+      double midlat = geoc.getLatitudeDeg();
+      double midlon = geoc.getLongitudeDeg();
 
       prevNode = tmpNode;
       tmpNode = globals->get_airwaynet()->findNearestNode(midlat, midlon);