Skip to content

Commit a70768c

Browse files
committed
Sub:add EKF failsafe page
1 parent a58c323 commit a70768c

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

sub/source/docs/ekf-inav-failsafe.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.. _ekf-inav-failsafe:
2+
3+
============
4+
EKF Failsafe
5+
============
6+
7+
The EKF failsafe monitors the health of EKF (the position and attitude estimation system) to catch problems with the vehicle's position estimate (caused by compass errors or velocity estimate errors) and prevent "swimaways".
8+
9+
When will it trigger?
10+
=====================
11+
12+
The EKF failsafe will trigger when any two of the EKF "variances" for compass, position or velocity are higher than the :ref:`FS_EKF_THRESH <FS_EKF_THRESH>` parameter value for 1 second.
13+
14+
These "variances" come from the EKF itself and are numbers indicating the EKF's confidence in its estimates. The values are between 0 and 1 with 0 meaning the estimate is very trustworthy and 1.0 is very untrustworthy.
15+
16+
The EKF calculates these "variances" by comparing the results from multiple sensors. So for example, if the GPS position suddenly jumps but the accelerometers do not show a sudden acceleration, the EKF variance for position would climb (i.e become less trustworthy)
17+
18+
The variances can be viewed in real-time on the ground station. If using Mission Planner click on the "EKF" label on the HUD.
19+
20+
.. image:: ../images/ekf-failsafe-variance-viewer.png
21+
:target: ../_images/ekf-failsafe-variance-viewer.png
22+
:width: 450px
23+
24+
What will happen when the failsafe triggers?
25+
============================================
26+
27+
- The autopilot's `LED will flash red-yellow or blue-yellow and the tone-alarm will sound <https://www.youtube.com/watch?v=j-CMLrAwlco&feature=player_detailpage&t=60s>`__
28+
- "EKF variance" will appear on the ground station's HUD if telemetry is connected
29+
- In manual flight modes that do not require position (i.e. Stabilize, Acro, AltHold) nothing further will happen but the pilot will be unable to switch into autonomous flight modes (PosHold, Guided, Auto) until the failure clears
30+
- In autonomous modes that require position (i.e. PosHold, Guided, Auto, etc) the :ref:`FS_EKF_ACTION <FS_EKF_ACTION>` controls the behaviour. By default this is "0" meaning the sub will take no action. "1" will send a GCS warning message. "2" will Disarm the sub.
31+
- An EKF failsafe error will be written to the dataflash logs
32+
33+
After an EKF failsafe occurs, the pilot can re-take control (using the flight mode switch) in a manual flight mode such as :ref:`AltHold <altholdmode>` to bring the vehicle home.
34+
35+
Adjusting the Sensitivity of the failsafe
36+
=========================================
37+
38+
The :ref:`FS_EKF_THRESH <FS_EKF_THRESH>` parameter can be adjusted to control the sensitivity of the failsafe
39+
40+
- Set :ref:`FS_EKF_THRESH <FS_EKF_THRESH>` = 0 to disable the EKF failsafe
41+
- Increase :ref:`FS_EKF_THRESH <FS_EKF_THRESH>` to values between 0.8 and 1.0 to reduce the chance of an EKF failsafe. The downside of increasing this parameter value is that during a flyaway caused by a bad compass or positioning glitch, the vehicle will swim further away before the failsafe is activated.
42+
- Decrease :ref:`FS_EKF_THRESH <FS_EKF_THRESH>` to values as low as 0.6 to increase the chance of an EKF failsafe triggering quickly. The downside of lowering this value is the EKF failsafe could trigger during aggressive maneuvers
43+
Loading

0 commit comments

Comments
 (0)