Skip to content

Commit

Permalink
Tools: autotest: Use GLOBAL keyword
Browse files Browse the repository at this point in the history
* This fixes the missing MAV_FRAME_GLOBAL from the conversion to
  relative alt

Signed-off-by: Ryan Friedman <[email protected]>
  • Loading branch information
Ryanf55 committed Oct 29, 2024
1 parent a6f00a3 commit e98678a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -11404,10 +11404,8 @@ def SetpointGlobalPos(self, timeout=100):
raise ValueError()

def to_alt_frame(alt, mav_frame):
if mav_frame in ["MAV_FRAME_GLOBAL_RELATIVE_ALT",
"MAV_FRAME_GLOBAL_RELATIVE_ALT_INT",
"MAV_FRAME_GLOBAL_TERRAIN_ALT",
"MAV_FRAME_GLOBAL_TERRAIN_ALT_INT"]:
# Per MAVLink spec, GLOBAL is a keyword to represent MSL.
if "GLOBAL" in mav_frame:
home = self.home_position_as_mav_location()
return alt - home.alt
else:
Expand Down

0 comments on commit e98678a

Please sign in to comment.