From: Durk Talsma Date: Sun, 1 Jan 2012 14:30:51 +0000 (+0100) Subject: --debugMsg; X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e0b6ee9d5d7b45e55a01afb60bb64c661cd9049b;p=flightgear.git --debugMsg; --- diff --git a/src/ATC/atc_mgr.cxx b/src/ATC/atc_mgr.cxx index e64c54945..dc5005e70 100644 --- a/src/ATC/atc_mgr.cxx +++ b/src/ATC/atc_mgr.cxx @@ -219,18 +219,23 @@ void FGATCManager::update ( double time ) { double speed = fgGetDouble("/velocities/groundspeed-kt"); double altitude = fgGetDouble("/position/altitude-ft"); + /* SGGeod me(SGGeod::fromDegM(longitude, latitude, altitude)); - SGGeod wpt(SGGeod::fromDegM(fp->getWayPoint(1)->getLongitude(), + SGGeod wpt1(SGGeod::fromDegM(fp->getWayPoint(1)->getLongitude(), fp->getWayPoint(1)->getLatitude(), fp->getWayPoint(1)->getAltitude())); + SGGeod wpt2(SGGeod::fromDegM(fp->getWayPoint(1)->getLongitude(), + fp->getWayPoint(1)->getLatitude(), + fp->getWayPoint(1)->getAltitude())); + + double course1, az1, dist1; + double course2, az2, dist2; + SGGeodesy::inverse(me, wpt1, course1, az1, dist1); - double course, az2, dist; - SGGeodesy::inverse(me, wpt, course, az2, dist); - - cerr << "Bearing to nearest waypoint : " << course << endl; - + cerr << "Bearing to nearest waypoint : " << course1 << " " << dist1 << ". (course " << course2 << ")." << endl; + */ ai_ac.setLatitude(latitude); ai_ac.setLongitude(longitude); ai_ac.setAltitude(altitude);