]> git.mxchange.org Git - flightgear.git/commitdiff
Modified Files:
authorfrohlich <frohlich>
Fri, 27 Jul 2007 19:31:44 +0000 (19:31 +0000)
committerfrohlich <frohlich>
Fri, 27 Jul 2007 19:31:44 +0000 (19:31 +0000)
src/AIModel/AIFlightPlanCreateCruise.cxx
src/Traffic/Schedule.cxx:
SGGeoc::fromCart should now work correct.

src/AIModel/AIFlightPlanCreateCruise.cxx
src/Traffic/Schedule.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);
index fcb27479aedb352a227322146091a37e2d59b263..35a1e44c92b81a10d424f07b10ee015498268d44 100644 (file)
@@ -315,14 +315,9 @@ bool FGAISchedule::update(time_t now)
          
          if (now > (*i)->getDepartureTime())
            {
-              //SGGeoc geoc = SGGeoc::fromCart(newPos);
-             //lat = geoc.getLatitudeDeg();
-             //lon = geoc.getLongitudeDeg(); 
-
-              Point3D temp = sgCartToPolar3d(Point3D(newPos[0], newPos[1],newPos[2]));
-             lat = temp.lat() * SG_RADIANS_TO_DEGREES;
-             lon = temp.lon() * SG_RADIANS_TO_DEGREES; 
-
+              SGGeoc geoc = SGGeoc::fromCart(newPos);
+             lat = geoc.getLatitudeDeg();
+             lon = geoc.getLongitudeDeg(); 
            }
          else
            {