A plane's EKF will not start without a GPS fix
What ArduPilot says:
- EKF3 init failure: No GPS lock
- EKF2 init failure: No GPS lock
On a plane the EKF, ArduPilot's position and attitude estimator, refuses to start until the GPS has a 3D fix: it relies on GPS speed from its first second. Until then the plane runs on DCM, the simpler back-up estimator. This exact text is rare; the same situation is usually reported as “AHRS: not using configured AHRS type”.
What to do, most likely first
The GPS has no 3D fix yet: indoors, or less than a minute after power-on.
CheckThe ground station shows the GPS status as No Fix or 2D, with few satellites.
FixTake the plane outside under open sky and wait for a 3D fix; a cold start can take a few minutes.
No GPS is detected at all.
CheckThe GPS status reads No GPS.
GPS1_TYPEand theSERIALn_PROTOCOLof its port (5 for a GPS) say what the flight controller expects and where.FixWire the GPS (its TX to the port's RX, its RX to TX), set the port and the type, and reboot.
Parameters to look at
| Parameter | What it is |
|---|---|
GPS1_TYPE | GPS type |
AHRS_EKF_TYPE | Use NavEKF Kalman filter for attitude and position estimation |
SERIAL3_PROTOCOL | Serial 3 (GPS) protocol selection |
SERIAL4_PROTOCOL | Serial4 protocol selection |
Where to do it:Board & Wiring Planner
The code that sends it
EKF3 init failure: No GPS lock
libraries/AP_NavEKF3/AP_NavEKF3_core.cpp NavEKF3_core::InitialiseFilterBootstrap() · Open in ArduPilot Copter-4.7.1
EKF2 init failure: No GPS lock
libraries/AP_NavEKF2/AP_NavEKF2_core.cpp NavEKF2_core::InitialiseFilterBootstrap() · Open in ArduPilot Copter-4.7.1