Why the GPS won't get a fix
If GPS won't get a fix and ARM permission never comes, look at the difference between satellite count and HDOP, the real cause of the error, and the step-by-step fix you can follow in the field.
You turned on the transmitter, powered the board, and minutes have passed. Mission Planner still shows no GPS fix. When you press ARM, the autopilot refuses to let you take off because the fix is bad.
The question behind it is always the same: is the module broken, or is there a problem with the sky? This article explains exactly what that warning is saying, why the satellite count alone isn't enough, and what order to follow in the field.
What a fix means and where the autopilot starts accepting it
A GPS module doesn't give you a single "working / not working" answer; it returns a level. This level is between 0 and 6, and whether ArduPilot allows takeoff depends directly on this number.
If you see three satellites, the module is working, but at least four satellites are needed to solve a position. With fewer than four it stays stuck at level 1, and the autopilot reports this as a bad fix.
The acceptance threshold is a 3D fix. As long as it stays below level 3, ARM permission won't come:
| Level | Name | What it means, what to do |
|---|---|---|
| 0 | NO GPS | The module isn't sending any data: serial port, baud rate, or cable. |
| 1 | NO FIX | The module is talking but can't solve a position. The antenna can't see the sky. |
| 2 | 2D FIX | Latitude and longitude are available, altitude isn't. ArduPilot doesn't consider this sufficient. |
| 3 | 3D FIX | The minimum accepted level. The pre-ARM GPS check passes from here. |
| 4 | DGPS | The correction service is active and horizontal error drops to a few meters. |
| 6 | RTK FIXED | Centimeter level. Requires a base station / RTCM. |
Seeing a 3D fix with 5 satellites doesn't mean the position is accurate enough to fly, either. For that you need to look at a second number.
Enough satellites, but the drone still won't take off
The satellite count alone doesn't tell you anything; what matters is how those satellites are distributed across the sky. If they're all clustered in one spot overhead, the solution geometry degrades, and the name for that degradation is HDOP.
The figure below has two sky maps. Eight satellites with HDOP 2.6 is worse than six satellites with HDOP 1.1: the cluster on the left stays above the threshold, while the spread-out satellites on the right stay below it.
Satellite distribution determines HDOP
In ArduPilot, the threshold is set by the GPS_HDOP_GOOD parameter, and its default is 140, which means HDOP 1.40. When it goes above that, the autopilot says “PreArm: High GPS HDOP”. Whether the EKF uses GPS for position depends on AHRS_GPS_MINSATS, whose default is 6 satellites.
GPS_HDOP_GOOD 140 # above 1.40 HDOP -> "PreArm: High GPS HDOP"
AHRS_GPS_MINSATS 6 # satellites the EKF needs to use the GPS
ARMING_CHECK 1 # all pre-checks enabledSo the moment you say “I have 8 satellites, what more does it want,” the second number to check is HDOP.
The most common mistake is looking at the satellite count and ignoring HDOP. The second most common is raising GPS_HDOP_GOOD to loosen the threshold because HDOP is high. Raising the threshold doesn't make the problem go away; it only makes it invisible, and it comes back during flight as position drift.
Read it from your own board in 60 seconds
Instead of looking at the Mission Planner HUD, taking the number straight from the board itself is the fastest diagnosis. The code below connects to the board, listens for the GPS_RAW_INT message, and prints the fix level, satellite count, and HDOP every two seconds.
Don't delete the request_data_stream_send line. Without it, the board doesn't send telemetry and the screen stays empty. This is the trap that wastes the most time.
from pymavlink import mavutil
import time
# Pixhawk: '/dev/ttyACM0' or 'COM5' ; SITL: 'tcp:127.0.0.1:5760'
BAGLANTI = 'tcp:127.0.0.1:5760'
usta = mavutil.mavlink_connection(BAGLANTI)
usta.wait_heartbeat()
print("Connected. sysid=%d compid=%d" % (usta.target_system, usta.target_component))
# Without this line GPS_RAW_INT never arrives and the screen stays empty.
usta.mav.request_data_stream_send(
usta.target_system, usta.target_component,
mavutil.mavlink.MAV_DATA_STREAM_ALL, 2, 1)
FIX = {0: "NO GPS", 1: "NO FIX", 2: "2D FIX", 3: "3D FIX",
4: "DGPS", 5: "RTK Float", 6: "RTK Fixed"}
print("%6s %10s %5s %7s %9s" % ("sn", "fix", "sats", "HDOP", "ARM?"))
baslangic = time.time()
son = 0.0
while time.time() - baslangic < 60:
m = usta.recv_match(type='GPS_RAW_INT', blocking=True, timeout=5)
if m is None:
continue
t = time.time() - baslangic
if t - son < 2.0:
continue
son = t
hdop = m.eph / 100.0 # eph in centimeter equivalent; 100 = 1.00 HDOP
uydu = m.satellites_visible
uygun = (m.fix_type >= 3) and (uydu >= 6) and (hdop <= 1.4)
print("%6.1f %10s %5d %7.2f %9s" % (
t, FIX.get(m.fix_type, "?"), uydu, hdop, "YES" if uygun else "NO"))
if uygun:
print("--> 3D fix acquired. Pre-takeoff conditions OK.")
breakHow to read the output
If you run the code on a healthy connection, you get output like this:
$ python3 gps_teshis.py
Connected. sysid=1 compid=0
s fix sats HDOP ARM?
2.1 RTK Fixed 10 1.21 YES
--> 3D fix acquired. Pre-takeoff conditions OK.If you connect the code to ArduCopter SITL, you'll see “RTK Fixed” in the fix column, because the simulation produces RTK-level positions. On a u-blox module on your own board, it's normal to see “3D FIX” on the same line.
When the GPS connection is lost, the autopilot prints these messages. These are ArduPilot's own texts:
PreArm: GPS 1: Bad fix
EKF3 IMU0 stopped aiding
EKF3 IMU1 stopped aiding
PreArm: GPS 1: Bad fix
Arm: GPS 1: Bad fixNote the last line: when you send the ARM command, the message arrives with the “Arm” prefix, not “PreArm,” and the command's COMMAND_ACK response is 4 (FAILED). An ACK of 0 only shows that the command was accepted, not that the motors are spinning.
Error Messages and Their Meanings
PreArm: GPS 1: Bad fix
The first GPS's fix level is below 3D. The module either can't solve a position at all or only has a 2D fix. Check the cable and serial port settings first, then whether the antenna can see the sky.
PreArm: High GPS HDOP
There is a fix, but the position geometry is bad: HDOP is above the GPS_HDOP_GOOD threshold. Move to an open area and wait a few minutes. Don't try to get past it by raising the threshold.
PreArm: GPS 1: not healthy
The module returns a position but data isn't arriving at the expected rate. It's usually a low baud rate, a bad cable, or a power problem. Check the module's 5V line and the connector solder joints.
PreArm: AHRS: waiting for home
The autopilot hasn't determined the home position yet. It passes on its own once the fix settles; wait a few seconds.
PreArm: GPS positions differ by 57.3m
The two GPS modules report positions more than 50 meters apart, or blending isn't healthy. If you use dual GPS, verify the fix of each one separately.
PreArm: GPS and AHRS differ by 11.4m
There is more than a 10-meter difference between the position GPS reports and the EKF's estimate. It usually points to a freshly acquired fix or a heading error caused by the compass.
PreArm: Need Position Estimate
The flight mode you selected needs a position, but the EKF can't produce one. If you're testing in Stabilize instead of LOITER or AUTO, you won't see this message; it comes back when you change the mode.
GPS Glitch or Compass error
The EKF saw a sudden jump in the GPS position. If it appears during flight, it means the position is jumping. When it clears, the autopilot prints “Glitch cleared”.
What to check on your board in the field
All of this is field work. HDOP degradation, the antenna's field of view, electromagnetic interference, and building shadows only show up on your own board, outdoors, with the real antenna. Do the diagnosis in this order:
- Check the cable and connector between the board and GPS by wiggling them by hand; a poor contact is the most common cause.
- Mount the GPS module as far as possible from the power distribution board and the video transmitter, preferably on a mast.
- On first power-up, wait 2-5 minutes in an open area for the cold start. The HDOP you read while standing next to a building will mislead you.
- Note down not only the satellite count but the satellite count together with HDOP, and measure at the same spot two days in a row.
- If it still doesn't improve, try the module on another board. This is the only way to tell whether the problem is in the module or the board.
Example: On competition morning you powered the board under the pit tent, and the HUD shows more than eight satellites, but ARM gives a high HDOP warning. The container and grandstand next to the tent block half of the sky, and the visible satellites cluster on one side. Take the vehicle out of the tent, put it on open ground, wait a few minutes, and watch HDOP drop along with the satellite count. Finish your takeoff preparation after that.
Preparing GPS and the other sensors for flight is covered in the Basic Drone Course: From Sensors to Flight.
Was this article helpful?
Learn this topic from start to finish
Season plan: all six courses for 9 months, ₺790 a month. ₺390 a month for high school and university students, ₺351 the first month with your member code. You can stop in any month you like. Start the Season plan · I'm a student