Correct description of getDistanceToGo() - this returns meters, not feet. Looking at the code it appears that it won't break anything to use the wrong units, so we'll just fx the documentation to make it clear its meters
This commit is contained in:
parent
0132ddf7a1
commit
97ca43a52a
1 changed files with 1 additions and 4 deletions
|
@ -339,10 +339,7 @@ void FGAIFlightPlan::eraseLastWaypoint()
|
||||||
wpt_iterator++;
|
wpt_iterator++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// gives distance in meters from a position to a waypoint
|
||||||
|
|
||||||
|
|
||||||
// gives distance in feet from a position to a waypoint
|
|
||||||
double FGAIFlightPlan::getDistanceToGo(double lat, double lon, FGAIWaypoint* wp) const{
|
double FGAIFlightPlan::getDistanceToGo(double lat, double lon, FGAIWaypoint* wp) const{
|
||||||
return SGGeodesy::distanceM(SGGeod::fromDeg(lon, lat), wp->getPos());
|
return SGGeodesy::distanceM(SGGeod::fromDeg(lon, lat), wp->getPos());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue