MAVLINKHUD

Overview

The CRASH parameter group configures the automatic Crash Detection logic. This safety feature is designed to rapidly identify when the vehicle has impacted the ground or an obstacle and is no longer under control.

Upon detection, the system immediately Disarms the Motors to:

  1. Prevent fire (stalled motors overheat ESCs).
  2. Prevent injury to bystanders.
  3. Minimize damage to the airframe and props.

Key Concepts

1. Detection Logic

Different vehicles use different logic:

  • Plane: Looks for sudden X-axis deceleration (impact) while flying (CRASH_ACC_THRESH).
  • Copter: Looks for a sustained error between Target Angle and Actual Angle (loss of control) combined with low throttle usage.

2. Check Logic (CRASH_DETECT)

(Note: Often CRASH_ACC_THRESH or FS_CRASH_CHECK).

  • If enabled, the code runs in the fast loop to monitor IMU spikes.

Parameter Breakdown

  • CRASH_ACC_THRESH: (Plane) Impact force threshold (m/s/s). 0 to disable.
  • CRASH_DETECT: (Some firmwares) Bitmask options.

Integration Guide

  • False Positives: If you hand-launch or use a bungee, ensure CRASH_ACC_THRESH is high enough not to trigger on release.
  • Rough Landings: If the plane disarms the moment it touches down (but bounces), you might need to relax the threshold or improve the landing flare logic.

Developer Notes

  • Library: Vehicle specific (ArduPlane/crash_check.cpp).
  • Safety: This is a critical safety feature for large/heavy drones.

CRASH_ACC_THRESH

$m/s^2$
Default 0
Range 0 127

Crash Deceleration Threshold (CRASH_ACC_THRESH)

Description

This parameter sets the sensitivity of the crash detection logic in ArduPlane. If the aircraft experiences a sudden deceleration (impact) along its longitudinal axis (X-axis) exceeding this value, the autopilot assumes a crash has occurred and instantly disarms the motor to prevent fire, injury, or further damage.

The Mathematics

$$ \text{Crash Triggered} \iff a\_x < -\text{CRASH\_ACC\_THRESH} $$
(Where negative $a\_x$ represents sudden braking/impact).

The Engineer's View

Defined in ArduPlane/Parameters.cpp. Checked in the main loop or inertial nav task.

  • 0: Crash detection disabled.
  • Note: False positives can occur during rough landings or bungee launches if set too low.

Tuning & Behavior

  • Default Value: 0 (Disabled)
  • Typical: 25 $m/s^2$ (~2.5G) for foamies.
  • Adjustment: Increase if you get disarmed during hard landings. Decrease if it fails to disarm on impact.

CRASH_ANGLE

deg
Default 0
Range 0 90

Crash Angle (CRASH_ANGLE)

Description

Defines the tip-over threshold for Rover vehicles. If the vehicle's roll or pitch angle exceeds this value, it will be considered crashed and the motors will be disabled.

  • A value of 0 disables the tip-over check.