
Diagnosing GPS Glitches in ArduPilot .bin Logs
Key Takeaway
A GPS glitch in ArduPilot logs as ERR Subsys=11 ECode=2, a drop in GPS.Status below 3, or HDop above 2 with falling NSats. Common causes are urban-canyon multipath, onboard RFI from ESCs and video transmitters, and antenna shadowing. Fix with antenna elevation, GPS_GNSS_MODE=65 multi-constellation, and dual-GPS configuration.
TL;DR: A GPS glitch in ArduPilot shows up as ERR Subsys=11 ECode=2, a GPS.Status drop below 3, or a sudden dip in GPS.NSats with GPS.HDop spiking past 2. The causes we see most often are urban-canyon multipath, RFI from the airframe (ESCs and video transmitters), and a marginal antenna pattern blocked by the body of the drone. Move the antenna up and clear of metal, enable multi-constellation, and gate flights on NSats > 12 with HDop < 1.2.
What ArduPilot logs about GPS
The GPS message records once per fix update from each receiver:
GPS TimeUS I Status GMS GWk NSats HDop Lat Lng Alt Spd GCrs VZ Yaw U
The fields that diagnose a glitch:
Status— fix type, enumerated asAP_GPS_FixType: 0=NO_GPS, 1=NO_FIX, 2=FIX_2D, 3=FIX_3D, 4=DGPS, 5=RTK_FLOAT, 6=RTK_FIXED, 7=STATIC, 8=PPP.NSats— satellites tracked. Solid lock is ≥12 in open sky; under 10 in cruise is a yellow flag.HDop— horizontal dilution of precision × 100 in the log. So a logged value of 150 is HDop 1.5. Below 100 is excellent, 100–200 acceptable, above 200 is glitch territory.U— whether this GPS instance is the one currently feeding the EKF. Matters on dual-GPS builds.
When the autopilot's glitch detector trips, it also writes ERR Subsys=11 ECode=2. That line is the cleanest "firmware agreed" indicator.
Confirming it in Mission Planner
Plot GPS.NSats, GPS.HDop, and GPS.Status on one chart. Add POS.Lat and POS.Lng so you can see whether the fused position jumped at the moment HDop spiked. The Errors tab will list every Subsys=11 line with the GPS subsystem name decoded.
Confirming it in MAVExplorer
MAV> graph GPS.NSats GPS.HDop GPS.Status
MAV> messages ERR
If you have a second receiver, overlay GPS2.HDop against GPS.HDop. Antenna or routing issues usually affect one GPS more than the other; common-mode RFI affects both at the same time. That distinction alone narrows the cause from "the GPS subsystem" to "this one antenna".
Why it happened — ranked by what we see most often
- Urban canyon multipath. Buildings reflect satellite signals; the receiver gets two copies of the same signal at different delays and computes the wrong range.
HDoprises whileNSatsoften stays high — that combination is the giveaway. - Onboard RFI. ESCs, video transmitters, and underslung payload power leads radiate into the GPS L1 band. Moving the GPS onto a mast above a copper ground plate fixes a surprising fraction of glitches in 5.8 GHz FPV builds.
- Antenna shadowing. Carbon-fibre frames and metal-can payloads block sky view in specific orientations. The glitch follows the drone's heading — an east-facing antenna with a metal canopy on the west side loses fixes when you yaw west.
- Marginal cold start. Within 90 seconds of power-on, ephemeris data isn't fully downloaded; the first 3D fix can be coarse. Arming gated only on
NSats > 10doesn't always catch this — HDop is the better gate. - Jamming. Real GNSS jammers exist near military and government installations.
NSatsfalls to single digits across all constellations simultaneously, often with a clean cliff edge.
Fixing it
- Get the antenna above the airframe. A 50 mm mast separating the GPS from the flight controller and ESCs solves most onboard RFI.
- Enable multi-constellation.
GPS_GNSS_MODE = 65on most modern u-blox receivers enables GPS + GLONASS + Galileo + BeiDou. More birds visible, faster recovery from local outages. - Use the EKF arming gate.
ARMING_CHECKbits for GPS and Position are enabled by default; do not disable them.GPS_HDOP_GOODsets the HDop ceiling for the EKF to consider a receiver healthy. - Dual-GPS configuration. Set
GPS_AUTO_SWITCH= 1 and ArduPilot will switch to the better receiver automatically. Combined withGPS_BLEND_MASK, you can fuse both into a noise-resistant solution. - Investigate persistent HDop above 1.5 in clear sky. If a clear-sky flight reads HDop near 2, the antenna or its ground plane is wrong — replace the antenna or move it.
- For RTK rigs, watch demotion paths.
GPS.Status=5(RTK_FLOAT) demoting to 4 (DGPS) or 3 (FIX_3D) is a centimetre-precision-to-metre-precision degradation that your altitude controller will react to. Log analysis should always reconcile against the base station's correction stream availability.
When this is not actually GPS
- Compass-induced position drift. A bad EKF heading makes the predicted-vs-measured position diverge, which the firmware sometimes blames on GPS. Check
MAG.MagX/Y/ZandXKF3.IMX/IMY/IMZto rule the compass in or out. - EKF lane switch. A position discontinuity can be the symptom of the EKF re-picking a primary core, not a receiver problem.
- Antenna disconnect.
NSatsdrops to 0 abruptly mid-flight rather than degrading. Usually a connector problem — the receiver is fine, the cable isn't.
When LogHat helps — and when it doesn't
LogHat surfaces Subsys=11 events automatically and overlays GPS.NSats, GPS.HDop, and GPS.Status against the EKF position innovations. What we can't do is tell you whether you were under a tree or near a transmitter at the moment of glitch — that ground-truth context belongs in your flight log notes, not the .bin. The log gets you to a confident receiver-side diagnosis; the physical context is still yours to provide.
About the author
LogHat Engineering Team
The LogHat engineering team — drone-systems engineers who build and operate the LogHat flight analytics platform. Posts in this byline are written and reviewed by team members working on the parsers, analysis engine, and Vector AI that the post describes.
Tagged
Try LogHat
Analyze your flight logs in seconds
Upload a .bin, .tlog, .log, or .ulg file. Get AI crash analysis, 3D replay, and forensic PDF reports instantly.
Try LogHat Free