· Course overview

GPS & Navigation on Your DEXI

How your drone knows where it is, from what a satellite broadcasts to a waypoint mission you have planned and flown yourself.

9 lessons · 110 minutes · DEXI-3 and DEXI-5 · PX4 · Updated September 2026
An exploded view of the round DEXI GPS board: the shielded satellite receiver module and its connector, the compass group, the regulator, the passives and the standoffs, all floating above the translucent board they solder to.
Fifteen parts, and every one of them has a reason. The course opens the board up in lesson 5.

Every satellite overhead broadcasts two things: the precise time from an atomic clock, and its own position in orbit. That is the whole transmission. It is one way, it is the same for everyone, and the satellite has no idea your drone exists.

Your receiver compares each timestamp against its own clock, turns the difference into a distance, and solves for where it must be standing for all of those distances to be true at once. Everything else follows from that one idea: why a fix needs four satellites rather than three, why a lock is not an accuracy, why a roof ends the conversation, and why a system that measures only distances can never tell you which way the nose is pointing.

What a satellite actually sends

Radio travels at a known speed, so a delay is a distance:

distance = delay × 299,792,458 m/s
one satellite puts you somewhere on a sphere

Three spheres intersect at a point, which suggests three satellites should be enough. A 3D fix needs four, and the reason is the clock. Satellites carry atomic clocks. Your drone carries a quartz crystal worth a few cents, and one microsecond of error in it is 300 meters of distance error. Rather than fit an atomic clock, the receiver treats its own clock error as a fourth unknown and solves for it alongside latitude, longitude and altitude. Four unknowns need four measurements. This is also why three satellites is not almost a fix; it is not a fix.

Four separate systems are broadcasting, and your receiver listens to all of them at once, which is why the general term is GNSS rather than GPS. More satellites in view is what keeps a fix alive near buildings and trees.

SystemOperator
GPSUnited States
GLONASSRussia
GalileoEuropean Union
BeiDouChina

Build the board first. This puts all fifteen parts on it one at a time, then asks you twelve questions about what you just placed. It runs in a browser, takes about ten minutes and needs no hardware. Open it full size.

A lock does not mean accuracy

"I have GPS lock" says almost nothing. Four numbers say whether to trust it, and they are not interchangeable.

Fix type is the first, and it carries a trap. A 2D lock reads like success and means altitude is unsolved, which is the axis that matters most at 40 meters up. The normal good state is a 3D lock; differential and centimeter-class locks are better still and need infrastructure on the ground.

Satellite count is the second. Four is the mathematical minimum, not a target. Outdoors under clear sky you should be seeing into the twenties or thirties. Stuck in single digits outdoors means obstructed sky, a mounting or orientation problem, or interference.

Dilution of precision is the third, and it is the one most often misread. DOP is a multiplier, not an accuracy in meters. It describes the geometry: satellites bunched into one patch of sky give a weak solution, satellites spread across the whole sky give a strong one, and DOP says how much that geometry amplifies whatever measurement error you already have. Below 1 is excellent, 1 to 2 is good, above 5 means go find better sky. It is also why a satellite count on its own is not enough. Ground stations usually display HDOP, horizontal, while the flight controller gates on PDOP, horizontal and vertical together. They are different numbers.

EPH and EPV are the fourth, the receiver's own estimate of how wrong it might be, horizontally and vertically, in meters. That is the number to quote when somebody asks how accurate your GPS is. A DEXI GPS board in an open field reads 32 satellites, a 3D differential lock, HDOP 0.50 and EPH 0.25 m. Compare against a known-good reading like that rather than guessing what good looks like.

The flight controller checks these before it will let you fly, and the defaults are worth knowing, because they are the numbers behind the refusal you eventually meet on a cold morning at a bad site:

ParameterDefaultWhat it gates
EKF2_REQ_FIX33D lock required
EKF2_REQ_NSATS6Satellites in the solution
EKF2_REQ_PDOP2.5Geometry
EKF2_REQ_EPH3.0 mClaimed horizontal error
EKF2_REQ_EPV5.0 mClaimed vertical error
EKF2_REQ_SACC0.5 m/sClaimed speed error

Which leads to the one piece of advice in this course that is closer to a warning. Do not fix a bad fix by loosening the gates. Raising the allowed error until the complaint stops does not improve anything; it moves the failure from the ground into the air, where it is a flyaway rather than a message on a screen.

What GNSS cannot tell you

Your drone is hovering still with thirty satellites. Which way is the nose pointing? Nothing in the system knows. GNSS measures distances, and a distance has no direction.

QuantityMeansFrom GNSS?
PositionWhere it isYes
CourseDirection of travelOnly while moving
HeadingDirection the nose pointsNo

A multirotor can fly north with its nose pointing west, and in a hover it has no course at all while still having a heading. This is not a detail. Every position correction is worked out in the world frame, north and east, and then converted into motor commands in the aircraft's own frame, and that conversion needs heading. Get heading wrong by 90 degrees and a correction meant to push north pushes east instead, which increases the error, which produces a larger wrong correction. That is the slow spiral away from the takeoff point that gets blamed on GPS and is almost always the compass.

Close-up of the compass chip on the DEXI GPS board, about 3 mm square, surrounded by its decoupling capacitors and two pull-up resistors.
The compass is the small chip at the center, 3 mm square. Everything crowded around it is there to support it.

So the drone needs a magnetic reference. The gyro gives excellent short-term heading but drifts and cannot tell you where to start; the Earth's field is an absolute reference that never drifts. The estimator fuses the two, gyro for fast and smooth, compass for the anchor.

The Earth's field is also weak, around 0.5 gauss, and a drone is a hostile place to measure it. Motors are magnets. Speed controllers switch tens of amps. Battery leads produce a field proportional to the current running through them, which means a compass mounted near the power wiring reads a different heading at different throttle settings. No calibration corrects that, because the error changes with what the aircraft is doing. The compass therefore goes as far from the power electronics as it can get, which is the mast the GPS is already on because it needs sky. Two sensors, two unrelated reasons, one best location. That is why the whole industry sells GPS and compass as a single part.

One more thing the course insists on, because it changes what you do on the bench: rotating the aircraft and watching the heading change proves nothing, since a badly distorted compass also produces a changing heading. Watch the total field magnitude instead. Rotating a sensor cannot change the Earth's field, so the magnitude has to stay constant. A known-good board held 0.364 to 0.360 gauss through a 90 degree rotation, about one percent. Tens of percent means something on the aircraft is contributing its own field, and calibration will not save it.

What a roof does

The signal left the satellite about 20,000 kilometers ago and arrives weaker than the background noise. A roof is enough to end it, and walls make it worse by reflecting what does get through, so the receiver either loses the fix or reports a confident position that is meters from where the aircraft is. The second failure is the dangerous one.

That is where this course hands off. Indoors a drone holds position on a completely different set of sensors, an optical flow camera and a downward distance sensor, with their own arithmetic and their own quiet failures. If that is where you are flying, start with Indoor Positioning on Your DEXI instead.

From a fix to a flown mission

The last section of the course puts it to work. A mission is an ordered list: takeoff, then waypoints, then return to launch as the last item, always. For a first mission keep it boring, four waypoints in a rectangle a hundred meters across at one altitude, well clear of everything. You are testing the system, not the flight plan.

Two things catch people out. Mission altitudes are relative to the takeoff point, not to the ground under each waypoint, so on sloping ground a mission gets closer to the terrain as it goes. And altitude is GNSS's weakest axis, which is why the flight controller allows 5.0 m of vertical error against 3.0 m horizontal. Plan with margin.

Set the boundaries before you fly, not after. The return altitude has to clear every obstacle between the far end of the mission and home, because a return flies a straight line and knows nothing about trees. The geofence is the backstop against a typo in a waypoint. And autonomous is not unsupervised: hand stays on the controller.

What you will be able to do

Course outline

1. How GPS Works
1How a Drone Knows Where It Is
2Reading Your Fix
2. The Hardware
3Inside the Receiver
4The Heading Problem
5From Chip to Board
3. PX4 Setup
6Plugging In
7PX4 Sees the GPS
8Compass Calibration
4. Fly a Mission
9Plan and Fly a Mission

Who this is for

Anyone flying a small drone outdoors who wants to know what the numbers on the screen mean, and anyone who has had an aircraft wander off and wants to know which sensor to blame. The lessons use the DEXI-3 and DEXI-5 running PX4 as the working examples and name real parameters, so you can go from a lesson to your own aircraft without translating. The reasoning applies to any flight stack that fuses GNSS with a compass.

You need a DEXI with a GPS module and somewhere outdoors with a clear view of the sky. The final mission can be flown in the simulator instead, which is a better place to make a first mistake.

Take the course

GPS & Navigation on Your DEXI is part of Flight Deck on the DroneBlocks platform. Start a free trial and the whole course opens, along with everything else on the platform.

Start your free trial 14 days. No credit card.

Common questions

Why does a drone need four satellites for a 3D fix?

Because the receiver's own clock is a fourth unknown alongside latitude, longitude and altitude. Satellites carry atomic clocks; a drone carries a quartz crystal worth a few cents, and one microsecond of clock error is 300 meters of distance error. Rather than fit an atomic clock, the receiver solves for its own clock error at the same time as its position. Four unknowns need four measurements, which is also why three satellites is not almost there.

Does GPS work indoors?

No. The signal arrives from orbit extremely weak, so a roof attenuates it and walls reflect it, and the receiver either loses the fix or reports a confident position that is meters from the truth. Indoors a drone holds position on optical flow and a downward distance sensor instead, which is a different set of sensors and a different set of failures.

How accurate is GPS on a drone?

Ask the receiver rather than guessing. It reports EPH and EPV, its own estimate of horizontal and vertical position error in meters. A DEXI GPS board in an open field reads 32 satellites, a 3D differential lock, HDOP 0.50 and EPH 0.25 m. Altitude is always the weaker axis, which is why the flight controller allows 5.0 m of vertical error against 3.0 m horizontal.

What is a good HDOP for a drone?

Below 1 is excellent, 1 to 2 is good, above 5 means go find better sky. Dilution of precision is a multiplier on your measurement errors, not an accuracy in meters: it describes how the satellites are spread across the sky, because satellites bunched in one patch give a weak solution and satellites spread out give a strong one. Note that ground stations usually show HDOP while the flight controller gates on PDOP, and they are not the same number.

Why does my drone drift or fly away in Position mode with a good GPS fix?

Usually heading, not position. Every correction is computed in the world frame and then converted into motor commands in the aircraft's frame, and that conversion needs to know which way the nose points. A heading wrong by 90 degrees turns a correction meant to push north into one that pushes east, which increases the error, which produces a bigger wrong correction. That is the slow spiral away from the takeoff point, and the fix is the compass, not the GPS.

Why is the compass mounted on the GPS board?

Because the Earth's magnetic field is weak, around 0.5 gauss, and a drone is a hostile place to measure it. Motors are magnets, speed controllers switch tens of amps, and a compass near the power wiring reads a different heading at different throttle settings, which no calibration can correct. So the compass goes as far from the power electronics as possible, which is the mast the GPS is already on because it needs a view of the sky. Two sensors, two unrelated reasons, one best location.

Related courses