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;
|
//cerr << "1"<< endl;
|
||||||
//SGGeoc geoc = SGGeoc::fromCart(SGVec3d(newPos[0], newPos[1], newPos[2]));
|
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;
|
|
||||||
|
|
||||||
|
double midlat = geoc.getLatitudeDeg();
|
||||||
|
double midlon = geoc.getLongitudeDeg();
|
||||||
|
|
||||||
prevNode = tmpNode;
|
prevNode = tmpNode;
|
||||||
tmpNode = globals->get_airwaynet()->findNearestNode(midlat, midlon);
|
tmpNode = globals->get_airwaynet()->findNearestNode(midlat, midlon);
|
||||||
|
|
|
@ -315,14 +315,9 @@ bool FGAISchedule::update(time_t now)
|
||||||
|
|
||||||
if (now > (*i)->getDepartureTime())
|
if (now > (*i)->getDepartureTime())
|
||||||
{
|
{
|
||||||
//SGGeoc geoc = SGGeoc::fromCart(newPos);
|
SGGeoc geoc = SGGeoc::fromCart(newPos);
|
||||||
//lat = geoc.getLatitudeDeg();
|
lat = geoc.getLatitudeDeg();
|
||||||
//lon = geoc.getLongitudeDeg();
|
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;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue