]> git.mxchange.org Git - flightgear.git/blobdiff - src/Traffic/Schedule.cxx
make --enable-osgviewer the default
[flightgear.git] / src / Traffic / Schedule.cxx
index fcb27479aedb352a227322146091a37e2d59b263..ac2a305c4f2b5cc2817c7b3a628a753728b1264b 100644 (file)
@@ -231,7 +231,7 @@ bool FGAISchedule::update(time_t now)
   if (!deptime)
     deptime = (*flights.begin())->getDepartureTime();
   FGScheduledFlightVecIterator i = flights.begin();
-  SG_LOG (SG_GENERAL, SG_INFO,"Processing registration " << registration << " with callsign " << (*i)->getCallSign());
+  SG_LOG (SG_GENERAL, SG_DEBUG,"Processing registration " << registration << " with callsign " << (*i)->getCallSign());
   if (AIManagerRef)
     {
       // Check if this aircraft has been released. 
@@ -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
            {