ArduPilot uses two layers of protection to keep the vehicle and people around it safe: arming checks that prevent the vehicle from arming when conditions are unsafe, and failsafes that respond automatically when a critical condition occurs during flight. Both systems are configurable, but their defaults are chosen conservatively—disabling or weakening them should only be done with a thorough understanding of the consequences.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Ardupilot/ardupilot/llms.txt
Use this file to discover all available pages before exploring further.
Arming checks (AP_Arming)
Before a vehicle can arm it must pass a series of pre-arm checks defined inAP_Arming (libraries/AP_Arming/AP_Arming.h). Each check is a bit in the ARMING_CHECK bitmask parameter. Setting the bit to 1 enables the check; the vehicle refuses to arm if the check fails and reports the reason as a STATUSTEXT pre-arm message.
GPS check
GPS check
Requires a 3D GPS fix with HDOP at or below
GPS_HDOP_GOOD (default: 140, i.e. 1.40). The vehicle will refuse to arm in GPS-required modes (Loiter, Auto, Guided, RTL) without this. The check also verifies that GPS velocity is consistent with the IMU.Compass check
Compass check
Verifies that the compass is calibrated (offsets set), that the field strength is within expected bounds, and that multiple compasses agree with each other. The expected field strength is derived from the vehicle’s location using the world magnetic model.
RC calibration check
RC calibration check
Confirms that all RC channels are within their calibrated trim and range values. A channel output of exactly 0 PWM typically indicates a disconnected receiver or an uncalibrated channel.
Barometer check
Barometer check
Verifies the barometer is healthy and reading a plausible atmospheric pressure. The check also ensures the baro has had time to settle after powerup.
AHRS/EKF health check
AHRS/EKF health check
Confirms that the Extended Kalman Filter has initialised and that attitude, velocity, and position variance values are below the threshold set by
FS_EKF_THRESH. The EKF must be healthy before arming is permitted.Battery check
Battery check
Confirms that the measured battery voltage (if a battery monitor is configured) is above the failsafe voltage threshold. This prevents arming with a flat pack.
Pre-arm messages
When a check fails ArduPilot sends aSTATUSTEXT message with the reason and the prefix "PreArm: ". The same message appears in the GCS console and on the OSD. Common examples:
Failsafe types
Failsafes respond to in-flight emergencies. Each failsafe type has a dedicated parameter to enable it and configure the action taken. Actions are applied only to an armed, flying vehicle; a disarmed vehicle on the ground is simply disarmed further if already disarmed.RC (throttle) failsafe
RC (throttle) failsafe
Trigger: The PWM value on the throttle channel falls below
The
FS_THR_VALUE (default: 975 µs) for more than a brief debounce period. This indicates a lost RC link (most RC systems drive the throttle channel to a low value on signal loss).Parameter: FS_THR_ENABLE| Value | Action |
|---|---|
| 0 | Disabled |
| 1 | Always RTL |
| 3 | Always Land |
| 4 | SmartRTL, or RTL if SmartRTL unavailable |
| 5 | SmartRTL, or Land if SmartRTL unavailable |
| 6 | Auto DO_LAND_START / DO_RETURN_PATH_START, or RTL |
| 7 | Brake, then Land |
FS_OPTIONS bitmask allows exceptions: for example, allowing a mission in Auto mode to continue rather than triggering RTL.Recovery: When the RC link is restored ArduPilot logs the resolved event and sends "Radio Failsafe Cleared". The pilot can switch modes normally.Battery failsafe
Battery failsafe
Trigger: Battery voltage falls below
BATT_LOW_VOLT or remaining capacity falls below BATT_LOW_MAH (low-level warning), or below BATT_CRT_VOLT/BATT_CRT_MAH (critical level).Each battery monitor instance has its own BATTn_FS_LOW_ACT and BATTn_FS_CRT_ACT parameters controlling the action at each level. Typical actions are RTL at the low level and Land at the critical level.ArduPilot treats the battery failsafe as higher priority than the RC failsafe—if both trigger simultaneously the battery action takes precedence during a landing sequence.Recovery: The battery failsafe clears only when the voltage recovers above the threshold, which typically does not happen in the field. Plan for a one-way event.GCS failsafe
GCS failsafe
Trigger: No heartbeat or valid MAVLink traffic is received from the GCS (identified by
The
SYSID_MYGCS) for longer than FS_GCS_TIMEOUT seconds (default: 5 s). The failsafe only activates if the GCS was previously connected—it will not trigger on a vehicle that has never seen a GCS heartbeat.Parameter: FS_GCS_ENABLE| Value | Action |
|---|---|
| 0 | Disabled |
| 1 | RTL |
| 3 | SmartRTL, or RTL |
| 4 | SmartRTL, or Land |
| 5 | Land |
| 6 | Auto DO_LAND_START / DO_RETURN_PATH_START, or RTL |
| 7 | Brake, then Land |
FS_OPTIONS parameter can allow autonomous missions in Auto mode or pilot-controlled modes to continue despite a GCS link loss.Recovery: ArduPilot sends "GCS Failsafe Cleared" when the GCS heartbeat is detected again.EKF failsafe
EKF failsafe
Trigger: The Extended Kalman Filter reports that compass variance, velocity variance, or position variance exceeds the threshold set by
The default action (Land) switches to Land mode when the EKF fails in a GPS-dependent mode. AltHold is an alternative that allows the pilot to retain manual control of altitude without GPS.
FS_EKF_THRESH (default: 0.8). This indicates that the EKF can no longer produce a reliable state estimate—typically caused by compass interference, GPS spoofing, or rapid acceleration.Parameter: FS_EKF_ACTION| Value | Action |
|---|---|
| 0 | Report only |
| 1 | Land if current mode requires position |
| 2 | AltHold if current mode requires position |
| 3 | Land from all modes |
FS_EKF_THRESH accepts values between 0 (disabled) and 1.0. A lower threshold is more sensitive but may produce false triggers in turbulence.Parameter: FS_EKF_THRESH| Value | Sensitivity |
|---|---|
| 0 | Disabled |
| 0.6 | Strict |
| 0.8 | Default |
| 1.0 | Relaxed |
Terrain failsafe
Terrain failsafe
Trigger: Terrain data is required by the active flight mode (Auto or Guided with terrain-following enabled) but is unavailable from the database for longer than
FS_TERRAIN_TIMEOUT_MS milliseconds.Action: The vehicle switches to RTL. This failsafe cannot be disabled independently; it is always active when a mode with requires_terrain_failsafe() returning true is active.Terrain data is sourced from the SD card terrain database (AP_Terrain) downloaded in advance from SRTM data via the GCS.Vibration failsafe (FS_VIBE_ENABLE)
Vibration failsafe (FS_VIBE_ENABLE)
Trigger: Excessive vibration is detected in the IMU data, indicating that the EKF’s inertial navigation solution may be compromised. Enabled by
FS_VIBE_ENABLE (default: 1).Action: The vehicle switches to Land mode. This is a safety measure for situations where vibration is severe enough to cause altitude errors or control instability.Advanced failsafe (AP_AdvancedFailsafe)
Fixed-wing vehicles (ArduPlane) support an additionalAP_AdvancedFailsafe system that adds geo-fence breach and GPS-glitch responses on top of the standard failsafes. The AFS is enabled by the AFS_ENABLE parameter and adds configurable terminal actions (termination or loiter) when the vehicle leaves defined boundaries. ArduCopter has a limited AFS implementation (AP_AdvancedFailsafe_Copter) guarded by AP_COPTER_ADVANCED_FAILSAFE_ENABLED.
Key failsafe parameters
| Parameter | Default | Description |
|---|---|---|
FS_THR_ENABLE | 1 (RTL) | RC throttle failsafe action |
FS_THR_VALUE | 975 µs | Throttle channel PWM threshold |
FS_GCS_ENABLE | 0 (disabled) | GCS heartbeat failsafe action |
FS_GCS_TIMEOUT | 5 s | Seconds before GCS failsafe triggers |
FS_EKF_ACTION | 1 (Land) | EKF variance failsafe action |
FS_EKF_THRESH | 0.8 | EKF variance threshold |
FS_CRASH_CHECK | 1 (enabled) | Disarm if crash detected |
FS_VIBE_ENABLE | 1 (enabled) | Switch to Land on excess vibration |
FS_OPTIONS | — | Bitmask to allow exceptions (e.g. continue mission) |
ARMING_CHECK | all enabled | Bitmask of pre-arm checks to perform |
The
FS_OPTIONS bitmask allows nuanced control over failsafe interactions. For example, bit 0 allows landing to continue through an RC failsafe, and bit 2 allows an Auto mission to continue through an RC failsafe. Consult the parameter description in your GCS for the full bitmask definition.