mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-28 19:21:03 +08:00
feat(commander)!: combine battery and bingo fuel failsafe into COM_LOW_BAT_ACT (#29620)
This commit is contained in:
1 parent
fedc33bdea
commit
c6ddbe1499
9 files changed
+132
-84
No files matched your search
@@ -298,7 +298,6 @@
|
||||
1 1 COM_FLTMODE4 11 6
|
||||
1 1 COM_FLTMODE5 -1 6
|
||||
1 1 COM_FLTMODE6 8 6
|
||||
1 1 COM_FLTT_LOW_ACT 3 6
|
||||
1 1 COM_FLT_TIME_MAX -1 6
|
||||
1 1 COM_FORCE_SAFETY 0 6
|
||||
1 1 COM_HLDL_LOSS_T 120 6
|
||||
|
||||
+35
-18
@@ -77,37 +77,54 @@ QGC allows users to set some aspects of the landing behaviour, such as the time
|
||||
|
||||
### Battery level failsafe
|
||||
|
||||
The low battery failsafe is triggered when the battery capacity drops below battery failafe level values.
|
||||
The battery level failsafe is triggered when the battery capacity drops below battery failsafe level values.
|
||||
You can configure both the levels and the failsafe actions at each level in QGroundControl.
|
||||
|
||||

|
||||
|
||||
The most common configuration is to set the values and action as above (with `Warn > Failsafe > Emergency`), and to set the [Failsafe Action](#COM_LOW_BAT_ACT) to warn at "warn level", trigger Return mode at "Failsafe level", and land immediately at "Emergency level".
|
||||
You should set the failsafe levels with `Warn > Failsafe > Emergency` as shown above.
|
||||
Note that PX4 will warn if the battery drops to the "Warn level" for any of action settings.
|
||||
|
||||
The failsafe actions can then be set to one of:
|
||||
|
||||
- `0: Warning` — Warn only.
|
||||
- `2: Land mode` — Land at the "Failsafe level".
|
||||
- `3: Distance-aware return, Critical level return, Emergency level land` (recommended) — Return mode at the "Failsafe" (critical) level, Land at the "Emergency" level, plus the [distance-aware return failsafe](#distance-aware-return-failsafe).
|
||||
- `5: Critical level return, Emergency level land` — Same as `3`, but without the [distance-aware return failsafe](#distance-aware-return-failsafe) (only warns).
|
||||
|
||||
The settings and underlying parameters are shown below.
|
||||
|
||||
| Setting | Parameter | Description |
|
||||
| --------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_LOW_BAT_ACT"></a>Failsafe Action | [COM_LOW_BAT_ACT](../advanced_config/parameter_reference.md#COM_LOW_BAT_ACT) | Warn, Return, or Land based when capacity drops below the trigger levels. |
|
||||
| <a id="BAT_LOW_THR"></a>Battery Warn Level | [BAT_LOW_THR](../advanced_config/parameter_reference.md#BAT_LOW_THR) | Percentage capacity for warnings (or other actions). |
|
||||
| <a id="BAT_CRIT_THR"></a>Battery Failsafe Level | [BAT_CRIT_THR](../advanced_config/parameter_reference.md#BAT_CRIT_THR) | Percentage capacity for Return action (or other actions if a single action selected). |
|
||||
| <a id="BAT_EMERGEN_THR"></a>Battery Emergency Level | [BAT_EMERGEN_THR](../advanced_config/parameter_reference.md#BAT_EMERGEN_THR) | Percentage capacity for triggering Land (immediately) action. |
|
||||
| Setting | Parameter | Description |
|
||||
| --------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_LOW_BAT_ACT"></a>Failsafe Action | [COM_LOW_BAT_ACT](../advanced_config/parameter_reference.md#COM_LOW_BAT_ACT) | Warn, Return, or Land based when capacity drops below the trigger levels. Option `3` adds distance-aware return. |
|
||||
| <a id="BAT_LOW_THR"></a>Battery Warn Level | [BAT_LOW_THR](../advanced_config/parameter_reference.md#BAT_LOW_THR) | Percentage capacity for warnings (or other actions). |
|
||||
| <a id="BAT_CRIT_THR"></a>Battery Failsafe Level | [BAT_CRIT_THR](../advanced_config/parameter_reference.md#BAT_CRIT_THR) | Percentage capacity for Return action (or other actions if a single action selected). |
|
||||
| <a id="BAT_EMERGEN_THR"></a>Battery Emergency Level | [BAT_EMERGEN_THR](../advanced_config/parameter_reference.md#BAT_EMERGEN_THR) | Percentage capacity for triggering Land (immediately) action. |
|
||||
|
||||
### Flight Time Failsafes
|
||||
### Distance-Aware Return Failsafe
|
||||
|
||||
There are several other "battery related" failsafe mechanisms that may be configured using parameters:
|
||||
The _distance-aware return_ failsafe engages [Return mode](../flight_modes/return.md) when the estimated remaining flight time drops to the time needed to return (in aviation this point is known as "bingo fuel").
|
||||
Unlike the [battery level failsafe](#battery-level-failsafe), it accounts for how far away the vehicle is: it triggers earlier when the return destination is far away, and later when it is close.
|
||||
|
||||
It is enabled by setting [COM_LOW_BAT_ACT](#COM_LOW_BAT_ACT) to `3`.
|
||||
With all other options PX4 only warns.
|
||||
|
||||
PX4 compares the time needed to return, estimated along the current Return mode path with the safety margin set by [RTL_TIME_FACTOR](../advanced_config/parameter_reference.md#RTL_TIME_FACTOR) and [RTL_TIME_MARGIN](../advanced_config/parameter_reference.md#RTL_TIME_MARGIN), against the remaining flight time of the battery with the least time left.
|
||||
Once Return mode has been triggered, it is not cancelled if the estimate improves again on the way back.
|
||||
|
||||
::: warning
|
||||
The failsafe needs a remaining flight time estimate, such as from the battery capacity ([BAT1_CAPACITY](../advanced_config/parameter_reference.md#BAT1_CAPACITY)) or a [smart battery](../smart_batteries/index.md).
|
||||
Without one it never triggers, and the vehicle is only protected by the [battery level failsafe](#battery-level-failsafe).
|
||||
:::
|
||||
|
||||
### Other Battery Related Failsafes
|
||||
|
||||
- The "remaining flight time for safe return" failsafe ([COM_FLTT_LOW_ACT](#COM_FLTT_LOW_ACT)) is engaged when PX4 estimates that the vehicle has just enough battery remaining for a return mode landing.
|
||||
You can configure this to ignore the failsafe, warn, or engage Return mode.
|
||||
- The "maximum flight time failsafe" ([COM_FLT_TIME_MAX](#COM_FLT_TIME_MAX)) allows you to set a maximum flight time after takeoff, at which the vehicle will automatically enter return mode (it will also "warn" at 90% of this time). This is like a "hard coded" estimate of the total flight time in a battery. The feature is disabled by default.
|
||||
- The "minimum battery" for arming parameter ([COM_ARM_BAT_MIN](#COM_ARM_BAT_MIN)) prevents arming in the first place if the battery level is below the specified value.
|
||||
|
||||
The settings and underlying parameters are shown below.
|
||||
|
||||
| Setting | Parameter | Description |
|
||||
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_FLTT_LOW_ACT"></a> Low flight time for safe return action | [COM_FLTT_LOW_ACT](../advanced_config/parameter_reference.md#COM_FLTT_LOW_ACT) | Action when return mode can only just reach safety with remaining battery. `0`: None (default), `1`: Warning, `3`: Return mode. |
|
||||
| <a id="COM_FLT_TIME_MAX"></a> Maximum flight time failsafe level | [COM_FLT_TIME_MAX](../advanced_config/parameter_reference.md#COM_FLT_TIME_MAX) | Maximum allowed flight time before Return mode will be engaged, in seconds. `-1`: Disabled (default). |
|
||||
| Setting | Parameter | Description |
|
||||
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_FLT_TIME_MAX"></a> Maximum flight time failsafe level | [COM_FLT_TIME_MAX](../advanced_config/parameter_reference.md#COM_FLT_TIME_MAX) | Maximum allowed flight time before Return mode will be engaged, in seconds. `-1`: Disabled (default). |
|
||||
|
||||
## Manual Control Loss Failsafe
|
||||
|
||||
|
||||
@@ -85,6 +85,13 @@ For users upgrading from v1.17, please take a moment to review the following bef
|
||||
The `-r` command-line rotation flag is removed; set the mounting orientation via [SENS_AFBR_ROT](../advanced_config/parameter_reference.md#SENS_AFBR_ROT) instead.
|
||||
([PX4-Autopilot#27385](https://github.com/PX4/PX4-Autopilot/pull/27385))
|
||||
|
||||
12. **Check the distance-aware return (remaining flight time) failsafe.**
|
||||
`COM_FLTT_LOW_ACT` has been removed and its function is part of [COM_LOW_BAT_ACT](../advanced_config/parameter_reference.md#COM_LOW_BAT_ACT) again: option `3` engages Return mode when the remaining flight time is only just enough to return. All other options only warn.
|
||||
This restores the behaviour that `COM_LOW_BAT_ACT=3` had with otherwise default parameters in v1.12 to v1.16; v1.17 was the exception, as it disabled the distance-aware return by default (`COM_FLTT_LOW_ACT=0`).
|
||||
`COM_FLTT_LOW_ACT` is not migrated: if you use `COM_LOW_BAT_ACT=3` and do not want distance-aware return, change it to the new option `5`.
|
||||
See [Distance-Aware Return Failsafe](../config/safety.md#distance-aware-return-failsafe).
|
||||
([PX4-Autopilot#26955](https://github.com/PX4/PX4-Autopilot/pull/26955))
|
||||
|
||||
## Hardware Support
|
||||
|
||||
### New Flight Controllers
|
||||
@@ -180,6 +187,7 @@ For users upgrading from v1.17, please take a moment to review the following bef
|
||||
|
||||
## Safety
|
||||
|
||||
- [Distance-aware return failsafe](../config/safety.md#distance-aware-return-failsafe) (also known as "bingo fuel"): engaging Return mode when the remaining flight time is only just enough to return is now part of [COM_LOW_BAT_ACT](../advanced_config/parameter_reference.md#COM_LOW_BAT_ACT) `3` (the new option `5` opts out), instead of the separate `COM_FLTT_LOW_ACT`. See the [Upgrade Guide](#upgrade-guide). ([PX4-Autopilot#26955](https://github.com/PX4/PX4-Autopilot/pull/26955))
|
||||
- Rotary-wing vehicles now support uncommanded altitude loss detection: if the vehicle descends more than [FD_ALT_LOSS](../advanced_config/parameter_reference.md#FD_ALT_LOSS) meters below its setpoint in altitude-controlled flight, flight termination (and parachute deployment) is triggered. See [Altitude Loss Trigger](../config/safety.md#altitude-loss-trigger). ([PX4-Autopilot#26837](https://github.com/PX4/PX4-Autopilot/pull/26837))
|
||||
- [Parachute health failsafe](../peripherals/parachute.md): extended [COM_PARACHUTE](../advanced_config/parameter_reference.md#COM_PARACHUTE) from a boolean into a configurable arming check and in-flight failsafe action parameter (Warning, Error, Return, or Land). The previously enabled value `COM_PARACHUTE=1` (Warning) now only warns without preventing arming; use `COM_PARACHUTE=2` (Error) or higher to prevent arming when the parachute system is missing or unhealthy. ([PX4-Autopilot#26918](https://github.com/PX4/PX4-Autopilot/pull/26918))
|
||||
- [GNSS check failsafe](../config/safety.md#gnss-check-failsafe): new failsafe that monitors the number of usable GNSS receivers with a 3D fix and their position consistency. The required number of receivers is set via [SYS_HAS_NUM_GNSS](../advanced_config/parameter_reference.md#SYS_HAS_NUM_GNSS) and the failsafe action via [COM_GNSSLOSS_ACT](../advanced_config/parameter_reference.md#COM_GNSSLOSS_ACT). ([PX4-Autopilot#26863](https://github.com/PX4/PX4-Autopilot/pull/26863))
|
||||
|
||||
Reference in new issue
Block a user