Modified Files:
src/AIModel/AIFlightPlanCreateCruise.cxx src/Traffic/Schedule.cxx: SGGeoc::fromCart should now work correct.
This commit is contained in:
parent
b0bb63bf79
commit
49779e64f0
2 changed files with 6 additions and 16 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue