Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: Document position target and attitude target support in Plane #6496

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions dev/source/docs/plane-commands-in-guided-mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This article lists the MAVLink commands that affect the movement of a Plane or Q

The code which processes these commands can be found `here in GCS_Mavlink.cpp <https://github.com/ArduPilot/ardupilot/blob/master/ArduPlane/GCS_Mavlink.cpp>`__

.. _movement_commands:
Movement commands
=================

Expand Down Expand Up @@ -55,3 +56,21 @@ These MAV_CMDs can be processed if packaged within a `COMMAND_INT <https://mavli
- `MAV_CMD_GUIDED_CHANGE_SPEED <https://mavlink.io/en/messages/common.html#MAV_CMD_DO_CHANGE_SPEED>`__
- `MAV_CMD_GUIDED_CHANGE_ALTITUDE <https://mavlink.io/en/messages/common.html#MAV_CMD_DO_CHANGE_ALTITUDE>`__
- `MAV_CMD_GUIDED_CHANGE_HEADING <https://mavlink.io/en/messages/common.html#MAV_CMD_GUIDED_CHANGE_HEADING>`__

Position Targets
================

To command the altitude in any supported frame, use `SET_POSITION_TARGET_GLOBAL_INT <https://mavlink.io/en/messages/common.html#SET_POSITION_TARGET_GLOBAL_INT>`__.
Ensure to set the `POSITION_TARGET_TYPEMASK <https://mavlink.io/en/messages/common.html#POSITION_TARGET_TYPEMASK>`__ bit 3.

To command the altitude in LOCAL frame, use `SET_POSITION_TARGET_LOCAL_NED <https://mavlink.io/en/messages/common.html#SET_POSITION_TARGET_LOCAL_NED>`__.
It is currently not necessary to bother with `POSITION_TARGET_TYPEMASK <https://mavlink.io/en/messages/common.html#POSITION_TARGET_TYPEMASK>`__.
The `MAV_FRAME <https://mavlink.io/en/messages/common.html#MAV_FRAME>`__ must be ``MAV_FRAME_LOCAL_OFFSET_NED``.

No other fields in position target messages are currently supported. Use :ref:`movement_commands` to send a lat lon alt target.

Attitude Targets
================

The low level attitude of the vehicle can be controlled with `SET_ATTITUDE_TARGET <https://mavlink.io/en/messages/common.html#SET_ATTITUDE_TARGET>`__.