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

Provide more information about how Guided mode for plane works #6096

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Binary file added images/guided-altitude.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 33 additions & 4 deletions plane/source/docs/guided-mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,41 @@
GUIDED Mode
===========

The GUIDED mode is used when you want the aircraft to fly to a specific
point on the map without setting up a mission. Most ground control
stations support a "click to fly to" feature where you can click a point
on the map and the aircraft will fly to that location then loiter.
GUIDED mode is used when you want the aircraft to fly to a specific
point on the map, or in specific direction (heading) without setting up a mission.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
point on the map, or in specific direction (heading) without setting up a mission.
point on the map, or in specific direction (heading) without setting up a mission.
GUIDED mode also supports overrides.


The other major use for GUIDED mode is in :ref:`geo-fencing <geofencing>`.
When the geo-fence is breached the aircraft will enter GUIDED mode, and
head to the predefined geo-fence return point, where it will loiter
until the operator takes over.

Location sub-mode
-----------------
Most ground control
stations support a "click to fly to" feature where you can click a point
on the map and the aircraft will fly to that location then loiter. If an
altitude is requested, the aircraft will try to achieve the target altitude as it flies,
and will loiter down or up to the requested altitude once it arrives, if required.
timtuxworth marked this conversation as resolved.
Show resolved Hide resolved

.. image:: ../../../images/guided-altitude.png

This sub-mode can also be requested via MAVLink using the DO_REPOSITION command.
timtuxworth marked this conversation as resolved.
Show resolved Hide resolved

If the vehicle is flying in Guided "Location sub-mode" then GUIDED_CHANGE_ALTITUDE and GUIDED_CHANGE_SPEED
commands will be ignored.

Heading sub-mode
----------------
The guided mode heading feature isn't supported by Mission Planner or QGroundControl, but can be
requested via MAVLink commands or using Lua. If the aircraft receives a GUIDED_CHANGE_HEADING
command it will fly indefinitely towards the heading in degrees.

The target altitude and desired airspeed or
groundspeed of the vehicle to fly at can be set using the GUIDED_CHANGE_ALTITUDE and GUIDED_CHANGE_SPEED
MAVLink commands. If the aircraft is flying in Guided "Heading sub-mode" then it will try to
achieve the altitude as it flies, as there is no "end point" to a heading target for a final loiter.

For more information about this, see the MAVLink GUIDED_CHANGE_HEADING documentation
timtuxworth marked this conversation as resolved.
Show resolved Hide resolved
https://mavlink.io/en/messages/ardupilotmega.html#MAV_CMD_GUIDED_CHANGE_HEADING


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Atttitude Overrides
---------------------
These overrides take priority. `SET_ATTITUDE_TARGET` can command roll, pitch, yaw, and throttle overrides.
Guided Slew Commands
---------------------------
`GCS_MAVLINK_Plane::handle_command_int_guided_slew_commands` sets `plane.guided_state.target_airspeed_cm`, `plane.guided_state.target_alt_rate`, `plane.guided_state.target_heading`, and more.

While this PR does improve the docs by documenting more ways that guided works, it's missing a few of the other supported modes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, your "Atttitude" has an extra t

Loading