A sensor disagrees with the EKF too much to arm
What ArduPilot says:
- PreArm: EKF velocity variance
- PreArm: EKF height variance
- PreArm: EKF position variance
- PreArm: EKF … variance
- PreArm: EKF compass variance
For a mode that needs a position, the copter compares four numbers from the EKF (ArduPilot's position and attitude estimator) with FS_EKF_THRESH (0.8 by default): compass, position, velocity and height, in that order. Each is the innovation, the difference between what the sensor says and what the EKF expected, as a share of the most the EKF will accept: at 1.0 the reading is thrown away. The message names the first that is at or above the threshold. It is the test behind the in-flight EKF failsafe, and it runs even when the other arming checks are off.
What to do, most likely first
Compass: it disagrees with the heading the EKF holds, because of metal nearby, a wrong orientation or an old calibration.
CheckMove 3 m away from cars and steel. Compare the heading in the ground station with a known direction (a street, a hand compass).
FixAway from metal it should clear within seconds. If not, calibrate the compass again; after moving the GPS and compass module, check its orientation too.
Position or velocity: the GPS data is jumping, from weak reception, reflections off buildings or interference from the copter's own electronics.
CheckThe position on the map wanders while the copter stands still; the satellite count is low or changing.
FixWait in the open for the GPS to settle. Keep video transmitters, cameras and USB 3 cables away from the GPS antenna.
Height: the barometer reading jumps or drifts (light or airflow on the sensor), or the copter was just carried up or down.
FixLet it stand still for 10 to 20 s. Shield the barometer with open-cell foam if the altitude wanders on the ground.
The EKF is still settling after start-up or after the copter was carried.
FixWait 30 s standing still; reboot if it does not settle.
Raising FS_EKF_THRESH hides the disagreement and also delays the EKF failsafe in flight. Keep 0.8 and find the sensor.
Parameters to look at
| Parameter | What it is |
|---|---|
FS_EKF_THRESH | EKF failsafe variance threshold |
COMPASS_USE | Use compass for yaw |
EK3_SRC1_YAW | Yaw Source |
EK3_SRC1_POSZ | Position Vertical Source |
Where to do it:Setup & Tuning GuideSetup & Tuning GuideFailsafe Explainer
The code that sends it
PreArm: EKF velocity variance
ArduCopter/AP_Arming.cpp AP_Arming_Copter::mandatory_gps_checks() · Open in ArduPilot Copter-4.6.3
PreArm: EKF height variance
ArduCopter/AP_Arming.cpp AP_Arming_Copter::mandatory_gps_checks() · Open in ArduPilot Copter-4.6.3
PreArm: EKF position variance
ArduCopter/AP_Arming.cpp AP_Arming_Copter::mandatory_gps_checks() · Open in ArduPilot Copter-4.6.3
PreArm: EKF … variance
ArduCopter/AP_Arming_Copter.cpp AP_Arming_Copter::mandatory_position_checks() · Open in ArduPilot Copter-4.7.1
And 1 more messages, sent from the same places.