Skip to content

ArduPlane: add support for "Heading Required" parameter to LOITER_TO_ALT from common mavlink #32278

@bjubes

Description

@bjubes

Feature request

MAV_CMD_NAV_LOITER_TO_ALT does not currently accept the common mavlink parameter 1 - heading required. I am proposing adding support for this parameter. If set to 1, LOITER_TO_ALT would keep its current behavior of continuing to loiter until its heading is towards its next waypoint. Otherwise the waypoint would be considered "reached" once the plane is at the specified altitude and immediately continue to its next waypoint.

Describe the solution you'd like

  • MAV_CMD_NAV_LOITER_TO_ALT accepts param1
  • when param1 is 1, no change to exiting implementation
  • when param1 is 0, LOITER_TO_ALT is reached when alt specified is reached, and does not continue loitering. Instead proceeds directly to next waypoint/mission item

I'm interested in implementing this solution. I have a good idea of the logical changes but would need confirmation on how best to transfer and store the parameter within AP_Mission::Mission_Command.content.

Describe alternatives you've considered
This has the unfortunate side effect of being a breaking change, as the current behavior aligns with the value begin set to 1 in the common dialect. Inverting the flag flag where 0 is heading required, and 1 is heading not required would be backwards-compatible with ardupilot, but be inverted from common mavlink

Platform
[ ] All
[ ] AntennaTracker
[ ] Copter
[x] Plane
[ ] Rover
[ ] Submarine

Additional context
Common Dialect Docs (param1 not supported): https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_LOITER_TO_ALT
Ardupilot Docs (param1 described): https://ardupilot.org/plane/docs/common-mavlink-mission-command-messages-mav_cmd.html#mav-cmd-nav-loiter-to-alt
Relevant change showing no support in docs: ArduPilot/ardupilot_wiki#6535

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions