Commit baebdb9
committed
AP_Common: add SITL check for matching alt frame in linearly_interpolate_alt
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 #329261 parent 17ce3c4 commit baebdb9
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
684 | 691 | | |
685 | 692 | | |
686 | 693 | | |
| |||
0 commit comments