1
0
Fork 0

Modified Files:

src/AIModel/AIFlightPlanCreateCruise.cxx
	src/Traffic/Schedule.cxx:
	SGGeoc::fromCart should now work correct.
This commit is contained in:
frohlich 2007-07-27 19:31:44 +00:00
parent b0bb63bf79
commit 49779e64f0
2 changed files with 6 additions and 16 deletions

View file

@ -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);

View 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
{