From 78a17b66643e224c40da56c19e8e9b5a1fe2812d Mon Sep 17 00:00:00 2001 From: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com> Date: Sun, 29 Dec 2024 22:15:20 -0700 Subject: [PATCH] dev: Document position target and attitude target support Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com> --- .../docs/plane-commands-in-guided-mode.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/dev/source/docs/plane-commands-in-guided-mode.rst b/dev/source/docs/plane-commands-in-guided-mode.rst index f56dad3ddd..53c22816ce 100644 --- a/dev/source/docs/plane-commands-in-guided-mode.rst +++ b/dev/source/docs/plane-commands-in-guided-mode.rst @@ -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 `__ +.. _movement_commands: Movement commands ================= @@ -55,3 +56,21 @@ These MAV_CMDs can be processed if packaged within a `COMMAND_INT `__ - `MAV_CMD_GUIDED_CHANGE_ALTITUDE `__ - `MAV_CMD_GUIDED_CHANGE_HEADING `__ + +Position Targets +================ + +To command the altitude in any supported frame, use `SET_POSITION_TARGET_GLOBAL_INT `__. +Ensure to set the `POSITION_TARGET_TYPEMASK `__ bit 3. + +To command the altitude in LOCAL frame, use `SET_POSITION_TARGET_LOCAL_NED `__. +It is currently not necessary to bother with `POSITION_TARGET_TYPEMASK `__. +The `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 `__. +