Add a comment explaining a wtf in alt estimation.

This commit is contained in:
Dan Albert 2022-10-09 22:45:26 -07:00 committed by Raffson
parent 0135e40f1a
commit 9e5f1d08d2
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -40,6 +40,11 @@ class Navigating(InFlight):
)
def estimate_altitude(self) -> tuple[Distance, str]:
# This does not behave well when one of the waypoints is AGL and the other is
# MSL. We can't really avoid that problem though. We don't know where the ground
# is, so conversions between them are impossible, and we do need to use AGL
# altitudes for takeoff and landing waypoints (even if we had the runway
# elevation, we don't have elevation for FARPs).
return (
meters(
lerp(