"PreArm: GPS Vertical Pos"
The Error
You are ready to fly. You arm the drone. The HUD rejects the command with:
PreArm: GPS Vertical Pos
What it Means
The Extended Kalman Filter (EKF) has detected that the vertical position reported by the GPS is inconsistent or unstable compared to the Barometer.
The Sensor Conflict
- Barometer: Measures air pressure. Very stable in the short term. Defines "Altitude = 0" at boot.
- GPS (Phone): Measures triangulation from satellites/towers. Noisy in the Z-axis.
If the GPS reports an altitude that drifts up and down by 10 meters while the Barometer says "We haven't moved," the EKF flags the GPS as unreliable.
Common Causes
1. The Geoid Offset (N-Value)
If your phone sends raw WGS84 Ellipsoid altitude, but ArduPilot expects MSL (Geoid) altitude, there is a constant offset (e.g., -35 meters).
- Symptom: The EKF sees a constant, massive discrepancy.
- Fix: Ensure the MAVLink GPS app has "Geoid Correction" enabled (it is by default).
2. Vertical Wander
Phone GPS altitude is notoriously poor, often having a variance of +/- 20 meters indoors.
- The Check: ArduPilot checks
vert_accuracy. If the phone reportsvert_accuracy > 5m(or if the EKF calculates the innovation is high), it triggers this PreArm error.
Solutions
- Wait: Sometimes the EKF just needs time to converge. Let the drone sit for 30-60 seconds.
- Reposition: Move the phone to a window or an area with better WiFi visibility to improve the Z-axis fix.
- Disable Vertical Fusion: If you only care about X/Y position hold and trust the Barometer for altitude:
- Set EK3_GPS_CHECK to ignore vertical variance (Advanced).
- Ideally, just let the EKF do its job. If it says the GPS is bad, it usually is.