Dead Reckoning Failsafe

Copter includes the Dead Reckoning Failsafe that allows a vehicle to return home (or partially return home) if it loses GPS (or more accurately if it loses its position estimate which could be based on GPS, OpticalFlow, etc).

Note

This failsafe is available in Copter-4.3 (and higher)

Note

Similar functionality is available using the copter-deadreckon-home.lua script (video1, video2)

Setup

When will it trigger?

The deadreckoning failsafe will trigger under the same conditions as the EKF failsafe. Namely when any two of the EKF “variances” for compass, position or velocity are higher than the FS_EKF_THRESH parameter for 1 second. In practice it is expected that normally it will be the loss of GPS that will trigger the failsafe.

What will happen when the failsafe triggers?

  • The vehicle will continue to fly normally for 7 to 10 seconds after the loss of GPS

  • “Dead Reckoning started” will be displayed on the GCS and the vehicle will switch to RTL mode and begin flying home

  • If the vehicle does not reach home within FS_DR_TIMEOUT seconds, the EKF failsafe will trigger and the vehicle will switch to Land mode

  • Even if the GPS recovers while the vehicle is returning home, the vehicle will remain in RTL

Testing

Follow the instructions below to test in the simulator or on a real vehicle. If testing on a real vehicle be ready to re-take control in a manul mode (e.g. Stabilize or AltHold)

  • Set RC9_OPTION to 65 to allow disabling the GPS from an auxiliary switch (any RC input channel may be used)

  • Arm and fly the vehicle in any mode that requires GPS (e.g. Loiter, Guided, Auto, etc)

  • Ensure the EKF has calculated a wind speed estimate by checking “wind_dir” and/or “wind_vel” in the ground station (see “Viewing Windspeed and Direction in Real-Time” on this page)

  • Raise the auxiliary switch high to disable the GPS

  • Within 7 to 10 seconds “Dead Reckoning started” should be displayed on the GCS and the vehicle should switch to RTL mode and begin flying home

  • After FS_DR_TIMEOUT seconds the EKF failsafe will trigger and the vehicle will switch to Land mode

  • If the vehicle’s position drifts too much, switch to AltHold mode to recover control of the vehicle

  • Lower the auxiliary switch at any time to re-enable the GPS

  • Post testing, lower or raise the FS_DR_TIMEOUT parameter to reflect the maximum number of seconds the vehicle can maintain control without GPS

Videos