Skip to content

Copter: accept MAV_FRAME_GLOBAL_RELATIVE_ALT_INT for NAV_TAKEOFF - #34865

Open
bansiesta wants to merge 2 commits into
ArduPilot:masterfrom
bansiesta:copter-takeoff-accept-relative-alt-int
Open

bansiesta wants to merge 2 commits into
ArduPilot:masterfrom
bansiesta:copter-takeoff-accept-relative-alt-int

Conversation

@bansiesta

Copy link
Copy Markdown

Summary

Copter: accept MAV_FRAME_GLOBAL_RELATIVE_ALT_INT for NAV_TAKEOFF sent via COMMAND_INT.

Classification & Testing (check all that apply and add your own)

  • Checked by a human programmer
  • Non-functional change
  • No-binary change
  • Infrastructure change (e.g. unit tests, helper scripts)
  • Automated test(s) verify changes (e.g. unit test, autotest)
  • Tested manually, description below (e.g. SITL)
  • Tested on hardware
  • Logs attached
  • Logs available on request

Extended MAV_CMD_NAV_TAKEOFF_command_int: takeoff with MAV_FRAME_GLOBAL_RELATIVE_ALT_INT must succeed, and MAV_FRAME_GLOBAL / MAV_FRAME_GLOBAL_INT must be denied. The new subtest fails on master (MAV_RESULT_DENIED) and passes with this change.

Description

Since mavlink/mavlink#2092 the _INT frames are synonyms of their non-_INT counterparts, and they are now marked superseded rather than invalid. Copter's NAV_TAKEOFF handler only accepted MAV_FRAME_GLOBAL_RELATIVE_ALT, so a GCS that sent the _INT spelling got DENIED. Everywhere else ArduPilot already accepts both spellings; this does the same for takeoff.

@julianoes

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Global Size Summary (Total Flash delta in bytes)

Built from 79114ee rebased onto 278a68a

Board Periph tracker blimp bootloader copter heli iofw plane rover sub
DrotekP3Pro _ _ _ * _ _ _ _ _ _
Durandal _ * * _ +4 +4 _ * * *
Hitec-Airspeed * _ _ _ _ _ _ _ _ _
KakuteF7 _ * * _ +4 +4 _ * * *
MambaH743v4 _ * * _ +8 +8 _ * * *
MatekF405-CAN _ _ _ * _ _ _ _ _ _
MatekF405 _ * * _ +4 +4 _ * * *
MatekH743-bdshot _ * * _ +4 +4 _ * * *
Pixhawk1-1M _ * * _ +4 +4 _ * * *
disco _ * * _ 0 0 _ * * *
f103-GPS * _ _ _ _ _ _ _ _ _

@julianoes

Copy link
Copy Markdown
Contributor

FYI @peterbarker. Related to mavlink/mavlink#2092

@bansiesta
bansiesta force-pushed the copter-takeoff-accept-relative-alt-int branch from 2fc21c8 to 5786cf4 Compare October 29, 2026 17:02
handle_MAV_CMD_NAV_TAKEOFF denied anything that was not
MAV_FRAME_GLOBAL_RELATIVE_ALT, so a GCS that sends COMMAND_INT with
MAV_FRAME_GLOBAL_RELATIVE_ALT_INT got MAV_RESULT_DENIED even though the
two frames are synonyms (mavlink/mavlink#2092, and ArduPilot#2376 marks the _INT
spelling superseded rather than invalid).

Everywhere else we accept both spellings, either through
mavlink_coordinate_frame_to_location_alt_frame() or explicitly as in
handle_command_int_external_position_estimate(). Do the same here.
Takeoff via COMMAND_INT must succeed with MAV_FRAME_GLOBAL_RELATIVE_ALT_INT
(the _INT spelling of the same frame) and be denied for absolute frames.
@bansiesta
bansiesta force-pushed the copter-takeoff-accept-relative-alt-int branch from 5786cf4 to 79114ee Compare October 30, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants