MAVLINKHUD

Overview

The FS parameter group configures the autopilot's Failsafe systems. These are automatic emergency protocols that trigger when something goes wrong (e.g., you lose radio contact or the battery is critically low).

Failsafes are the primary defense against "Fly-Aways."

Key Concepts

1. Triggers

The autopilot monitors several conditions:

  • Radio (RC): Triggered if the signal from your transmitter is lost.
  • Battery: Triggered based on BATT_LOW_VOLT or BATT_LOW_MAH.
  • GCS: Triggered if the telemetry link to the Ground Control Station is lost (useful for long-range autonomous missions).
  • EKF: Triggered if the state estimator becomes unhealthy (e.g., GPS glitch).

2. Actions (FS_..._ACTION)

What the drone does when a failsafe triggers:

  • 0 (None): Does nothing (Dangerous!).
  • 1 (RTL): Returns to the launch point and lands.
  • 2 (Land): Lands immediately at its current position.
  • 3 (SmartRTL): Retraces its path home.

Parameter Breakdown

  • FS_THR_ENABLE: Enable/Disable Radio Failsafe.
  • FS_THR_VALUE: The PWM threshold below which the autopilot assumes the radio is disconnected (usually ~950us).
  • FS_BATT_ENABLE: Action for low battery.
  • FS_GCS_ENABL: Action for GCS link loss.

Integration Guide

Testing Radio Failsafe

  1. Remove Props.
  2. Arm the vehicle in a safe mode (e.g., Loiter).
  3. Turn off your RC Transmitter.
  4. Verify the HUD switches to "Failsafe" and the vehicle mode changes to "RTL" or "Land."

Developer Notes

  • Library: libraries/AP_Vehicle / AP_Failsafe.
  • Priority: If multiple failsafes trigger, the system prioritizes the most conservative action (e.g., Land over RTL).

FS_ACTION

Default 0
Range 0 4

Failsafe Action (FS_ACTION)

Description

FS_ACTION tells your Rover what to do if it loses its connection to the pilot (Radio or GCS).

  • 0: Nothing. The Rover continues whatever it was doing (DANGEROUS).
  • 1: RTL. The Rover returns to its home location.
  • 2: Hold. The Rover stops and waits for the signal to return.
  • 3: SmartRTL. The Rover retraces its path back to home.
  • 4: SmartRTL or RTL.

Tuning & Behavior

  • Default: 0.
  • Recommendation: Set to 1 (RTL) or 2 (Hold) for safety.
  • Dependencies: Requires a valid Home position if using RTL.

FS_CRASH_CHECK

Default 1
Range 0 1

Crash Check Enable (FS_CRASH_CHECK)

Description

FS_CRASH_CHECK is a major safety feature for multirotors.

It uses the IMU and motor data to detect if the drone has hit an obstacle or flipped on its side. If a crash is detected (e.g., the drone is at an extreme angle and the motors are working hard but not moving it), the autopilot will instantly disarm the motors to prevent further damage or injury from spinning propellers.

  • 0: Disabled. (Dangerous).
  • 1: Enabled (Default).

Tuning & Behavior

  • Recommendation: Always leave this enabled. It is one of the most effective ways to prevent "Fly-aways" or ESC fires after a minor collision.

FS_DR_ENABLE

Default 1
Range 0 1

Dead Reckoning Failsafe Enable (FS_DR_ENABLE)

Description

FS_DR_ENABLE allows the drone to try and come home even if its GPS "Goes Blind."

Normally, if GPS is lost, the drone can only land vertically. With Dead Reckoning (DR), the autopilot uses the compass, IMU, and air data to estimate its position and "Guess" its way back to the Home point. It isn't perfect, but it's often enough to get the drone back into transmitter range.

  • 0: Disabled. The drone will Land instantly if GPS is lost during a mission.
  • 1: Enabled (Default). The drone will try to fly toward Home for a short time using DR.

Tuning & Behavior

  • Requirement: Requires a well-calibrated compass and a good wind estimation (from a pitot tube or EKF learning).

FS_DR_TIMEOUT

s
Default 30
Range 0 120

Dead Reckoning Failsafe Timeout (FS_DR_TIMEOUT)

Description

FS_DR_TIMEOUT defines how long you trust your drone to "Guess" its way home.

Dead reckoning becomes more inaccurate the longer it runs. If the drone hasn't found its home or regained GPS within this many seconds, it will stop its horizontal movement and land vertically to prevent drifting miles away into unknown territory.

FS_EKF_ACTION

Default 1
Range 1 3

EKF Failsafe Action (FS_EKF_ACTION)

Description

FS_EKF_ACTION determines how the drone reacts if its "Internal Map" becomes unreliable (see FS_EKF_THRESH).

  • 1: Land (Default). The drone will immediately perform a controlled descent and land. This is the safest option if the GPS or Compass data is bad.
  • 2: AltHold. The drone will switch to Altitude Hold mode. This stops it from following a bad GPS position but allows the pilot to take manual control and fly by sight.
  • 3: Land (Strict). Forces a landing even if the drone is currently in a manual mode like Stabilize.

FS_EKF_FILT

Hz
Default 0.5
Range 0.1 5.0

EKF Failsafe Filter Frequency (FS_EKF_FILT)

Description

FS_EKF_FILT determines how "Stable" the failsafe trigger is.

The EKF variance is constantly jumping up and down. This parameter smooths those jumps out.

  • Higher Value: Faster reaction. The drone will failsafe immediately if a sensor glitches.
  • Lower Value: Slower, more robust reaction. The drone will ignore tiny "Spikes" in variance but will take longer to realize if a sensor has truly failed.

FS_EKF_THRESH

Default 0.8
Range 0.6 1.0

EKF Failsafe Threshold (FS_EKF_THRESH)

Description

FS_EKF_THRESH is the "Trust Limit" for your drone's brain.

The EKF merges data from the GPS, Compass, and IMU. It is constantly checking if these sensors agree with each other. If they don't (e.g. because the compass is glitching or the GPS has high interference), the EKF "Variance" increases.

  • Higher Value (1.0): More tolerant. The drone will keep flying even if the sensors are slightly inconsistent.
  • Lower Value (0.6): More sensitive. The drone will trigger a failsafe early if it detects any sensor disagreement.

Tuning & Behavior

  • Default Value: 0.8.
  • Recommendation: Leave at 0.8. If you are flying in an area with a lot of magnetic interference (near steel buildings), you might need to increase this slightly, but be aware that the drone's position will be less accurate.
  • Action: When this threshold is exceeded, the drone will trigger the action set in FS_EKF_ACTION (usually Landing or switching to a non-GPS mode).

FS_GCS_ENABL

Default GCS_FAILSAFE_OFF
Range null

GCS failsafe enable

Note: This parameter functions identically to FS_GCS_ENABLE.

FS_GCS_ENABLE

Default 0
Range 0 5

GCS Failsafe Enable (FS_GCS_ENABLE)

Description

FS_GCS_ENABLE defines what the drone does if it loses its MAVLink telemetry connection.

This is primarily used for long-range missions where the drone is controlled via a laptop rather than a traditional RC remote.

  • 0: Disabled (Default). The drone continues its mission even if the telemetry link is lost.
  • 1: Enabled (RTL). The drone returns home immediately.
  • 2: Enabled (Continue in Auto). If the drone is currently on an autonomous mission, it continues. If not, it returns home.

Tuning & Behavior

  • Safety: Ensure you have a valid Home position and no obstacles in the RTL path before enabling this.

FS_GCS_TIMEOUT

s
Default 5
Range 2 120

GCS Failsafe Timeout (FS_GCS_TIMEOUT)

Description

FS_GCS_TIMEOUT sets the "Grace Period" for your telemetry link.

If you are using a laptop or tablet to control your drone (MAVLink control), this parameter defines how many seconds the autopilot will wait after losing the connection before it decides the link is broken and starts its failsafe action (usually RTL).

Tuning & Behavior

  • Default Value: 5 seconds.
  • Recommendation: Leave at 5 for most operations. If you are flying in an area with known signal gaps, you can increase this slightly, but be aware that the drone will continue its last commanded action until the timer expires.

FS_LEAK_ENABLE

Default 0
Range 0 3

Leak Failsafe Enable (FS_LEAK_ENABLE)

Description

FS_LEAK_ENABLE defines the emergency response for water-based vehicles (ROVs and Boats) if their internal leak sensors are triggered.

  • 0: Warn Only. Displays a warning on the GCS but takes no autonomous action.
  • 1: Surface. (ArduSub). Commands the ROV to climb to the surface immediately.
  • 2: Hold. Stops all movement and maintains current position.

Tuning & Behavior

  • Default: 0 (Warning).
  • Recommendation: Set to 1 (Surface) for ROVs to ensure the vehicle is recoverable if the hull is compromised.
  • Prerequisite: Requires at least one leak sensor (LEAK1_TYPE) to be enabled.

FS_LONG_ACTN

Default 0
Range 0 4

Long Failsafe Action (FS_LONG_ACTN)

Description

FS_LONG_ACTN defines the "Plan B" for a sustained radio link failure. While FS_SHORT_ACTN handles brief glitches, the "Long" action is triggered after the connection has been dead for several seconds (see FS_LONG_TIMEOUT).

  • 0: Continue (Standard). If in AUTO mode, the plane keeps flying its mission. If in manual, it triggers RTL.
  • 1: RTL. The plane returns home immediately regardless of mode.
  • 2: FBWA. The plane level the wings and holds altitude (Circle mode fallback).
  • 3: Parachute. Deploys the parachute if configured.

Tuning & Behavior

  • Default: 0.
  • Safety: For most users, setting this to 1 (RTL) is the safest choice to ensure the plane comes back if the radio fails.

FS_LONG_TIMEOUT

s
Default 5.0
Range 2 120

Long Failsafe Timeout (FS_LONG_TIMEOUT)

Description

FS_LONG_TIMEOUT sets the duration of signal loss required to trigger the FS_LONG_ACTN.

  • Standard Setting: 5 seconds.
  • Long Range: If you are flying at the extreme edge of your radio range where "link blips" are common, you may increase this to 10s or 20s to avoid unnecessary RTLs.

Tuning & Behavior

  • Default: 5.0.
  • Warning: Increasing this value means the drone will continue flying its last known command for longer without pilot input. Use with caution.

FS_OPTIONS

Default 16
Range 0 63

Failsafe Options (FS_OPTIONS)

Description

FS_OPTIONS allows you to customize exactly when the drone should "Ignore" a radio or GCS failure and keep flying.

  • Bit 0 (1): RC Continue if Auto. If the drone is on an autonomous mission, it will keep going even if the RC transmitter is turned off.
  • Bit 1 (2): GCS Continue if Auto. Keeps the mission going if the telemetry link is lost.
  • Bit 4 (16): GCS Continue if Pilot Control. (Default). If you are using a GCS to control the drone but still have your RC radio connected, losing the GCS link will not trigger a failsafe.

Tuning & Behavior

  • Default Value: 16.
  • Safety: Only enable Bits 0 or 1 if you are an expert and have verified that your drone has a fully autonomous landing/safety plan.

FS_PILOT_INPUT

Default 0
Range 0 2

Pilot Input Failsafe Action (FS_PILOT_INPUT)

Description

FS_PILOT_INPUT defines the vehicle's "Dead Man's Switch" behavior.

This is primarily used for ArduSub (underwater ROVs). Since these vehicles are often tethered, a loss of communication can happen. If the flight controller doesn't see any stick movement or heartbeat from the pilot for a certain amount of time, it assumes the pilot is incapacitated or the link is broken.

  • 0: Disarm/Disable. Stops motors immediately.
  • 1: Hold. (Recommended). Maintains current depth and position.
  • 2: Surface. Commanded ascent to the surface.

Tuning & Behavior

  • Default: 0.
  • Requirement: Requires FS_PILOT_TIMEOUT to be set.
  • Safety: For ROVs, Hold (1) is usually the safest option to prevent the tether from becoming tangled in a prop while the vehicle "Ghost drifts."

FS_PILOT_TIMEOUT

s
Default 3.0
Range 0.1 10.0

Pilot Input Failsafe Timeout (FS_PILOT_TIMEOUT)

Description

FS_PILOT_TIMEOUT sets the "Grace Period" for radio or joystick interruptions.

If the autopilot does not receive a new stick command within this many seconds, it triggers the FS_PILOT_INPUT action.

Tuning & Behavior

  • Default: 3.0 seconds.
  • Recommendation: Leave at 3.0. A value too short (e.g. 0.5) might trigger the failsafe if the telemetry link has a brief, normal hiccup. A value too long (e.g. 10.0) might allow the drone to drift too far before reacting to a lost link.

FS_PRESS_ENABLE

Default 0
Range 0 3

Internal Pressure Failsafe Enable (FS_PRESS_ENABLE)

Description

FS_PRESS_ENABLE is a hardware protection feature for ArduSub ROVs.

If an ROV has an internal pressure sensor, an increase in pressure can indicate a structural failure or a fast-expanding gas (e.g., from a failing battery). This parameter defines the emergency response.

  • 0: Disabled.
  • 1: Warn Only.
  • 2: Surface.

Tuning & Behavior

  • Default: 0.
  • Requirement: Requires a valid internal pressure sensor and a configured FS_PRESS_MAX threshold.

FS_PRESS_MAX

Pa
Default 105000
Range 0 200000

Internal Pressure Failsafe (FS_PRESS_MAX)

Description

FS_PRESS_MAX is a specialized safety setting for ArduSub ROVs.

It monitors the pressure sensor inside the ROV's dry housing. If the pressure rises above this limit, it usually indicates a leak or an impending structural failure. The autopilot can then trigger an emergency ascent or warning to protect the electronics.

Tuning & Behavior

  • Default: 105,000 Pa (Standard atmospheric pressure is approx 101,325 Pa).
  • Calibration: Set this slightly above your normal sealed housing pressure.

FS_SCR

Default 0
Range 0 4

Failsafe OSD Screen (FS_SCR)

Note: This parameter is an alias for OSD_FS_SCR.

FS_SHORT_ACTN

Default 0
Range 0 2

Short Failsafe Action (FS_SHORT_ACTN)

Description

FS_SHORT_ACTN defines the immediate response to a radio signal loss. It triggers after FS_SHORT_TIMEOUT (typically 1.5 seconds).

  • 0: Circle (Standard). The plane enters Circle mode and holds its current location.
  • 1: RTL. The plane starts returning home immediately.
  • 2: FBWA. Fallback to level flight.

Tuning & Behavior

  • Default: 0.
  • Best Practice: Leave at 0 (Circle) to allow the link a few seconds to recover before committing to a full RTL return.

FS_SHORT_TIMEOUT

s
Default 1.5
Range 1 5

Short Failsafe Timeout (FS_SHORT_TIMEOUT)

Description

FS_SHORT_TIMEOUT defines the delay before the autopilot admits the radio signal is truly gone.

It is designed to filter out "Micro-Glitches" caused by local interference or signal multipathing.

  • Standard Setting: 1.5 seconds.

Tuning & Behavior

  • Default: 1.5.
  • Usage: If your link is very "choppy" but you still want manual control, you can increase this to 2.0s or 3.0s, but be aware that the drone will keep its last RC inputs during this time.

FS_TEMP_ENABLE

Default 0
Range 0 3

Internal Temperature Failsafe Enable (FS_TEMP_ENABLE)

Description

FS_TEMP_ENABLE defines the emergency response if the internal electronics enclosure gets too hot.

  • 0: Disabled.
  • 1: Warn Only.
  • 2: Surface.

Tuning & Behavior

  • Default: 0.
  • Requirement: Requires a configured FS_TEMP_MAX threshold.

FS_TEMP_MAX

degC
Default 70
Range 0 100

Internal Temperature Failsafe (FS_TEMP_MAX)

Description

FS_TEMP_MAX protects the vehicle's electronics from overheating.

FS_TERRAIN_ENAB

Default 0
Range 0 2

Terrain Failsafe Enable (FS_TERRAIN_ENAB)

Description

FS_TERRAIN_ENAB defines the "Safety Net" for terrain-following missions.

If you are flying an autonomous mission where the drone's altitude is relative to the ground (Terrain Following), the autopilot requires a steady stream of terrain data (from the SD card or a rangefinder). If this data is lost (e.g., SD card error or flying into an area with no map coverage), this parameter tells the drone how to react.

  • 0: Disarm/Land. (Standard for some vehicles).
  • 1: RTL. Immediately returns home using Barometric (standard) altitude.
  • 2: Continue. (Risky). Switch to barometric altitude and continue the mission at the current height above home.

Tuning & Behavior

  • Default: 0.
  • Recommendation: Set to 1 (RTL) to ensure the drone returns to a safe location if it can no longer "see" the ground profile.

FS_THR_ENABLE

Default 0
Range 0 5

Throttle Failsafe Enable (FS_THR_ENABLE)

Description

FS_THR_ENABLE is the primary failsafe for your radio control link.

If you fly out of range or your transmitter battery dies, your drone needs to know how to react.

  • 0: Disabled. No action. (Dangerous!).
  • 1: Enabled (RTL). The drone will automatically return home and land.
  • 3: Enabled (Smart-RTL or RTL). The drone will try to retrace its steps home.
  • 5: Enabled (Land). The drone will land exactly where it is.

Tuning & Behavior

  • Recommendation: Always set this to 1 (RTL) for any outdoor mission.
  • Trigger: This failsafe is triggered if the throttle channel drops below FS_THR_VALUE or if the receiver stops sending data (Radio Loss).

FS_THR_VALUE

PWM
Default 910
Range 910 1100

Throttle Failsafe Threshold (FS_THR_VALUE)

Description

FS_THR_VALUE sets the "Alarm Trigger" for your radio connection.

Most RC receivers are configured to pull the throttle channel to a very low value (e.g. 900) if the link to the transmitter is lost. If the autopilot sees the throttle signal drop below this parameter's value, it immediately triggers a Failsafe action (like RTL or Hold).

Tuning & Behavior

  • Default: 910.
  • Setup:
    1. Check your normal throttle range in the GCS (usually 1100 to 1900).
    2. Turn off your transmitter and see what the throttle value drops to.
    3. Set FS_THR_VALUE to at least 10 units above that value, but well below your normal minimum throttle (e.g. if transmitter-off is 900, set this to 910).
  • Warning: If set too high (e.g. 1150), the drone might trigger a failsafe even when you just pull the stick to idle.

FS_VIBE_ENABLE

Default 1
Range 0 1

Vibration Failsafe Enable (FS_VIBE_ENABLE)

Description

FS_VIBE_ENABLE activates a "Limp Mode" for drones suffering from extreme vibration.

If a drone has a damaged propeller or a loose motor, the resulting vibrations can overwhelm the EKF, making the drone fly erratically or drift away. When this failsafe is enabled, the autopilot detects the high vibration and automatically switches to a simpler navigation model that is less accurate but far more resistant to vibration noise.

  • 0: Disabled.
  • 1: Enabled (Default).