mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
linearly_interpolate_alt() interpolates altitude between two Location endpoints and only produces meaningful results when both endpoints share an alt frame; mixing frames produces nonsense altitudes. Add a SITL-only panic at the top of the function so the contract is checked for every caller (BendyRulerHorizontal and Dijkstras path handling in AC_WPNav_OA, plus any future callers), as suggested by IamPete1 in code review. Fixes #32926