Crash Check conditions details

Hi All,

I’m trying to understand what exactly triggers the crash check in ArduCopter. The wiki page gives five conditions, most of which are straightforward. The last two I want to understand better.

“4. the vehicle is not accelerating by more than 3m/s/s”:
From the code (crash_check.cpp line 59) and related, that’s 1 Hz low-pass filtered, with 1g subtracted from the z-axis. I’ll admit I get a little lost in the code trying to track that down, so can anyone clarify:

  • Is the z-axis body-relative or earth-relative? I’m trying to understand what this would look like if a craft came to rest at some weird orientation, (90 degress nose-down, for example).
  • What acceleration value is being used? IMU accelerometer? Output of EKF? Something else? Is it something someone could find in the .bin logs somewhere, pre-filter at least?

“the actual lean angle has diverged from the desired lean angle (perhaps input by the pilot) by more than 30 degrees”:
From the same file, that’s derived from get_att_error_angle_deg(), which comes from the attitude controller. Is that then check-able from ATT ErrRP entries in the log (or somewhere else)?

There also appear to be two other checks: one for lean angle over 15 degrees, and one for speed under 10 m/s.

I’m trying to get a good understand of both what might cause false positives (as mentioned on the wiki page) and false negatives (when a copter might be crashed but fail the checks and remain armed).

Thanks.