The EKF has no usable attitude yet
What ArduPilot says:
- PreArm: EKF attitude is bad
The EKF, ArduPilot's position and attitude estimator, reports that its attitude (roll, pitch and heading) cannot be used. That is so until the EKF is healthy and both its tilt alignment and its heading alignment are complete, and again whenever it has to restart. It is part of the INS group of arming checks.
What to do, most likely first
The EKF is still aligning after power-on.
Check“EKF3 IMU0 tilt alignment complete” and “EKF3 IMU0 MAG0 initial yaw alignment complete” have not both appeared yet.
FixKeep the copter still for 10 to 30 s.
The gyros were calibrated while the copter was being moved, so their zero is off and the attitude will not settle.
CheckThe horizon in the ground station drifts while the copter stands still.
FixReboot and do not touch the copter for the first seconds after power-on.
The heading cannot be aligned: the compass is missing, unhealthy or switched off while the EKF still expects one.
CheckTilt alignment completed but no yaw alignment line follows; look for a pre-arm line about the compass.
FixFix the compass message first. Flying with no compass at all is a separate set-up (
EK3_SRC1_YAW8 with a good GPS), not something to switch on at the field.
Parameters to look at
| Parameter | What it is |
|---|---|
AHRS_EKF_TYPE | Use NavEKF Kalman filter for attitude and position estimation |
COMPASS_USE | Use compass for yaw |
EK3_SRC1_YAW | Yaw Source |
Where to do it:Setup & Tuning Guide
The code that sends it
PreArm: EKF attitude is bad
ArduCopter/AP_Arming.cpp AP_Arming_Copter::ins_checks() · Open in ArduPilot Copter-4.6.3
ArduCopter/AP_Arming_Copter.cpp AP_Arming_Copter::ins_checks() · Open in ArduPilot Copter-4.7.1