docs: add docs on new guided course mode

This commit is contained in:
mahima-yoga
2026-05-22 15:17:56 +02:00
parent 602146b8cb
commit 0ce3309466
3 changed files with 77 additions and 0 deletions

View File

@@ -76,6 +76,7 @@
- [Takeoff Mode (FW)](flight_modes_fw/takeoff.md)
- [Land Mode (FW)](flight_modes_fw/land.md)
- [Hold Mode (FW)](flight_modes_fw/hold.md)
- [Guided Course Mode (FW)](flight_modes_fw/guided_course.md)
- [Mission Mode (FW)](flight_modes_fw/mission.md)
- [Return Mode (FW)](flight_modes_fw/return.md)
- [Offboard Mode (FW)](flight_modes_fw/offboard.md)

View File

@@ -0,0 +1,74 @@
# Guided Course Mode (Fixed-Wing)
<img src="../../assets/site/position_fixed.svg" title="Position required (e.g. GPS)" width="30px" />
_Guided Course mode_ maintains a constant ground track (course), altitude, and airspeed without any manual stick input.
The operator controls the vehicle entirely via [GCS commands](#in-flight-commands), making it the guided equivalent of [Position mode](../flight_modes_fw/position.md).
:::tip
This mode is suited to situations where an operator wants to guide a fixed-wing vehicle from a GCS without manual control.
:::
::: info
- Requires a horizontal velocity estimate (e.g. GPS/dead-reckoning).
Course commands will be rejected if the velocity estimate is unavailable.
- Manual control input is ignored.
<!-- https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/commander/ModeUtil/mode_requirements.cpp -->
:::
## Overview
On activation, the vehicle captures its current velocity over ground vector as the initial course bearing and holds altitude and airspeed from the moment of activation.
The vehicle then flies that course indefinitely until the operator issues a new command.
There is no waypoint sequencing or autonomous path planning: the GCS guides the vehicle in real time by sending individual commands.
## Supported Commands
The following commands are accepted while in Guided Course mode:
| Command | Effect |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [MAV_CMD_GUIDED_CHANGE_HEADING] | Set a new course bearing (degrees, 0 = north) with `HEADING_TYPE = 0`. Rejected if horizontal velocity estimate is unavailable. |
| [MAV_CMD_DO_CHANGE_ALTITUDE] | Set a new target altitude (AMSL, metres). |
| [MAV_CMD_DO_CHANGE_SPEED] | Set a new equivalent airspeed via param2 (m/s). If param2 ≤ 0, the default cruise speed is restored. |
[MAV_CMD_GUIDED_CHANGE_HEADING]: https://mavlink.io/en/messages/common.html#MAV_CMD_GUIDED_CHANGE_HEADING
[MAV_CMD_DO_CHANGE_ALTITUDE]: https://mavlink.io/en/messages/common.html#MAV_CMD_DO_CHANGE_ALTITUDE
[MAV_CMD_DO_CHANGE_SPEED]: https://mavlink.io/en/messages/common.html#MAV_CMD_DO_CHANGE_SPEED
## Technical Description
The navigator mode (`course.cpp`) sets a position setpoint with `course` (ground track bearing) and `alt` fields populated, and `yaw = NAN`.
The fixed-wing mode manager (`FixedWingModeManager`) detects the finite `course` field and bypasses normal waypoint sequencing, calling `navigateBearing()` from the directional guidance library to compute lateral acceleration and course setpoints.
Longitudinal control targets the altitude and airspeed from the setpoint.
## Failsafe Behaviour
Guided Course is classified as an `AUTO` mode for failsafe purposes.
The following failsafe exception parameters apply:
| Parameter | Bit | Effect when set |
| -------------------------------------------------------------------------- | -------------- | ------------------------------------------------- |
| [COM_RCL_EXCEPT](../advanced_config/parameter_reference.md#COM_RCL_EXCEPT) | 1 (Auto modes) | RC loss does not trigger a failsafe in this mode. |
| [COM_DLL_EXCEPT](../advanced_config/parameter_reference.md#COM_DLL_EXCEPT) | 1 (Auto modes) | GCS connection loss does not trigger a failsafe. |
:::warning
Since Guided Course is driven entirely by GCS commands, operators should carefully consider the datalink loss failsafe setting (`COM_DLL_EXCEPT` bit 1).
If the GCS link drops, the vehicle will continue on its last commanded course indefinitely.
It is strongly recommended to either leave the datalink failsafe active or ensure a secondary safety mechanism (e.g. geofence, battery failsafe) is in place.
:::
## Parameters
| Parameter | Description |
| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [FW_AIRSPD_TRIM](../advanced_config/parameter_reference.md#FW_AIRSPD_TRIM) | Default cruise airspeed used on activation and when `MAV_CMD_DO_CHANGE_SPEED` is sent with value ≤ 0. |
| [FW_AIRSPD_MIN](../advanced_config/parameter_reference.md#FW_AIRSPD_MIN) | Minimum airspeed. Commanded airspeed is clamped to this value. |
| [FW_AIRSPD_MAX](../advanced_config/parameter_reference.md#FW_AIRSPD_MAX) | Maximum airspeed. Commanded airspeed is clamped to this value. |
| [COM_RCL_EXCEPT](../advanced_config/parameter_reference.md#COM_RCL_EXCEPT) | RC loss failsafe exceptions bitmask. Bit 1 covers all auto modes including Guided Course. |
| [COM_DLL_EXCEPT](../advanced_config/parameter_reference.md#COM_DLL_EXCEPT) | Datalink loss failsafe exceptions bitmask. Bit 1 covers all auto modes including Guided Course. |

View File

@@ -39,6 +39,8 @@ Airspeed is actively controlled if an airspeed sensor is installed in any autono
- [Hold](../flight_modes_fw/hold.md) — Vehicle circles around the GPS hold position at the current altitude.
The mode can be used to pause a mission or to help regain control of a vehicle in an emergency.
It can be activated with a pre-programmed RC switch or the QGroundControl Pause button.
- [Guided Course](../flight_modes_fw/guided_course.md) — Vehicle maintains a constant ground track, altitude, and airspeed.
The operator commands course, altitude, and airspeed changes in real time from the GCS. Manual stick input is ignored.
- [Return](../flight_modes_fw/return.md) — Vehicle flies a clear path to land at a safe location.
By default the destination is a mission landing pattern.
The mode may be activated manually (via a pre-programmed RC switch) or automatically (i.e. in the event of a failsafe being triggered).