Skip to content

Commit

Permalink
dev: Document position target and attitude target support
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
  • Loading branch information
Ryanf55 authored and Hwurzburg committed Dec 30, 2024
1 parent c7035c3 commit 78a17b6
Showing 1 changed file with 19 additions and 0 deletions.
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>`__.

0 comments on commit 78a17b6

Please sign in to comment.