The GPS position and ArduPilot's own position estimate are apart
What ArduPilot says:
- PreArm: GPS and AHRS differ by N.Nm
The AHRS is ArduPilot's running estimate of where the aircraft is; it blends GPS with the inertial sensors. On the ground the two should coincide. Arming is refused when the GPS position and the estimate are more than 10 m apart horizontally. The number in the message is the distance.
What to do, most likely first
The GPS position is still wandering after start-up or after the aircraft was carried, and the estimate lags behind.
FixLeave the aircraft still in the open for a minute.
The GPS position jumps: reflections between buildings, or satellites coming and going.
CheckOn the ground station's map the aircraft hops about while it sits still.
FixMove away from walls and trees and wait for more satellites.
The estimator is not following the GPS: it has rejected the GPS data, usually because the compass or the accelerometers disagree with it.
CheckThe distance does not shrink over a minute, and other pre-arm messages about the EKF or the compass appear with it.
FixReboot where you mean to take off and keep the aircraft still while it starts. If it repeats, deal with the compass and accelerometer messages first.
Where to do it:Setup & Tuning GuideFailsafe Explainer
The code that sends it
PreArm: GPS and AHRS differ by N.Nm
libraries/AP_Arming/AP_Arming.cpp AP_Arming::gps_checks() · Open in ArduPilot Copter-4.7.1