Drone Navigation & Perception · Lv1 Beginner · about 18 min

How does a drone know where it is?

Position is fixed by finding distances from how long satellite signals take to arrive, as the point where the distances to several satellites overlap (at least four satellites, including the receiver's clock error).

Start the lesson with exercises in your browser

No account needed. Your progress is saved in this browser.

Read this lesson in another language: 日本語 · Español · Français

What you will learn

  • Explain how GNSS works: a distance comes from how long a satellite signal takes to arrive, and several satellites fix your position.
  • Explain what a barometer, a compass and optical flow each measure, and the situations in which they tend to go wrong.
  • Explain why the sensors you can rely on differ outdoors and indoors, and choose the right sensors for a situation.
  • Notice GNSS disturbance or loss (multipath, jamming, spoofing, magnetic interference), and fly on the safe side even when position hold is not working.

How position is found (GNSS)

A drone "estimates" its position

Unlike a person, a drone has no eyes to look at the scenery and realize "I'm near the station," and no hands to unfold a map. All it has are numbers from a few sensors.

GNSSBarometerCompassOptical flowIMUPositionestimateFlightcontrolEstimate
The cues used to estimate position, and where they go

So the drone calculates its position from the sensor numbers. It measures, calculates and judges "I'm probably here." This is called position estimation.

Example: Walking with your eyes closed

Say you close your eyes and walk 100 steps straight ahead. Your real stride is 70 cm, but you think it is 72 cm, so after 100 steps you are off by about 2 m. The more you walk, the more the error adds up: after 1,000 steps it is about 20 m at the same rate.

Finding your current position by adding up steps and directions is called dead reckoning. A drone adds up the motion from its IMU (an inertial sensor that combines accelerometers and gyros). Because the errors build up, it corrects its position from time to time with outside cues such as satellite signals. This cycle of "estimate, then correct" is the foundation of navigation.

Finding position from satellite signals

GNSS is the umbrella name for systems that measure position from satellite signals. Examples include GPS (United States) and Michibiki (Japan). Each satellite broadcasts its orbit information and the time it sent the signal toward the ground.

The satellites do not know where the drone is. The receiver measures the signal's travel time Δt from the difference to the time it arrived, and calculates the distance. For example, GPS satellites orbit at an altitude of about 20,000 km, and a signal from a satellite directly overhead arrives in about 0.07 seconds (orbit altitude differs between kinds of satellites). That is a very short time to measure.

d = c × Δtd: distance to the satellite [m] c ≈ 3.0×10⁸ m/s (the speed of light) Δt: signal travel time [s]
Satellite 1Satellite 2Satellite 3Your positionLeftover intersection (candidate)
Your position is where the three distance circles meet

With one distance, all you can say is that you are somewhere on a circle (a sphere, in space). The figure is a flat example: with only two circles, two intersections remain, and the third circle narrows it to one point. This is trilateration. In space there are four unknowns, east-west, north-south and height plus the receiver's clock error, so at least four satellites are used.

When GNSS goes wrong

GNSS is powerful, but it is not always accurate. The distance comes from "how long the signal traveled," so anything that disrupts the signal's journey turns directly into position error.

The main causes are signal delay in the atmosphere, tiny errors in the satellites' clocks and orbits, and reflections off buildings and other objects. On top of that, a poor arrangement of satellites in the sky magnifies these errors in the position. Even under a wide-open sky, an ordinary receiver's position is still off by a few meters, and the amount varies with conditions.

BuildingSatelliteDroneDirect signalReflected signal (long way)
A signal reflected off a building arrives by a longer route
  • multipath and blocking: a signal reflected off a wall is measured as a longer distance by the length of the detour, so the position shifts. When you are surrounded by tall buildings, fewer satellites are visible, too.
  • jamming: interference that drowns out the weak satellite signals with strong radio noise. The position "stops coming out."
  • spoofing: interference that uses fake satellite signals to make the receiver believe a wrong position or time. The position "still comes out" but is wrong, so it can be hard to notice.
Caution: Spot the warning signs

The position suddenly jumps a long way, the number of visible satellites suddenly drops, the position moves while the drone is standing still, or the drone's motion does not match the change in its GNSS position. If you notice signs like these, do not push on: decide to land somewhere away from people and property. Never experiment with transmitting interference signals; it endangers other equipment nearby too.

Exercises in this part (solved inside the lesson)

  • How GNSS fixes a position
  • How many meters is 1 microsecond of clock error?
  • Find where the sky gets narrow

Cues other than GNSS

Cues for height, heading and motion

Under an open sky, GNSS tells you your position, but its height tends to be less accurate than its horizontal position. Also, an ordinary GNSS (with a single antenna) works out heading from the direction you have moved, so it cannot give a heading while you are standing still. Other sensors cover these weak spots.

  • GNSS: knows your absolute position from the travel time of satellite signals. It is weak near buildings, indoors and under interference.
  • Barometer: knows changes in height from air pressure. It is sensitive to small ups and downs, but its readings shift with changes in the weather and with the airflow around the drone.
  • compass: knows which way the nose points from the direction of the Earth's magnetic field. Near iron, electric currents or magnets the magnetic field is disturbed and the heading drifts off. This is magnetic interference.
  • optical flow: a downward-facing camera sees how far the ground pattern has moved in the image and works out how fast the drone is moving. It works without GNSS, but struggles over surfaces with little pattern and in the dark.
  • IMU: knows short-term motion from acceleration and angular velocity. It is fast and needs nothing from outside, but its error builds up over time.
Note: Barometric altitude is good at "changes"

Near sea level, air pressure drops by about 1 hPa (hectopascal) for every rise of about 8 m. barometric altitude, found from this conversion, is sensitive to small ups and downs. But the weather moves the air pressure too, so it is a better cue for "how much has it changed since a moment ago" than for "how many meters above sea level."

Caution: Calibrating the compass

Calibrate in an open place away from steel-framed buildings and cars, following the steps in the user manual. If a source of interference is nearby, an error remains even after calibration. Changing location comes before repeating the calibration.

What to rely on indoors

Indoors, walls and roofs weaken satellite signals, so GNSS is often unusable. In buildings with a lot of steel framing, the compass is easily disturbed too. The cues you can rely on change from one situation to the next.

  • Wide-open field: GNSS, barometer, compass and IMU all work. Watch for signs of jamming or spoofing.
  • Between tall buildings: GNSS is disturbed by reflections and blocking. Lean on the barometer and IMU, and do not rely on GNSS alone.
  • Indoor warehouse: rely on optical flow, a downward distance sensor and the IMU. GNSS does not work, and the steel frame easily disturbs the compass too.
  • Over water: GNSS, barometer and IMU work. A water surface has little pattern, so optical flow works poorly.

A downward distance sensor measures the height above the floor directly, using sound or light. Combined with optical flow, it tells you both your motion over the floor and your height. Indoors, the barometer can still measure small changes in height, but air conditioning and similar systems can shift the air pressure.

The key is not to rely on a single cue. Combine strengths and weaknesses so that when one is disturbed, another takes over. Some systems also place markers in the building in advance and use them as position cues.

Note: Coming up next

Tracking motion with only information from below and the IMU also builds up error over time. At Lv2 you will learn to estimate errors in numbers, and at Lv3 you will learn to combine images and the IMU to keep the buildup of error in check.

Exercises in this part (solved inside the lesson)

  • Sensors and their weak spots
  • When the compass reading is unstable
  • What can you rely on in an indoor warehouse?

Position hold, and losing it

Position hold and attitude mode

position hold is control that keeps the drone in place when you let go of the sticks, by measuring its own position as it goes. It watches how far the measured position has shifted and keeps nudging the drone back, so in GPS mode (the mode that holds position using GNSS) the drone stops as soon as you let go.

01234560246Time [s]Speed [m/s]Wind speed 2 m/sGPS modeAttitude mode
Speed after you let go of the stick (teaching model)

When GNSS is lost, the GNSS position cues are gone. If optical flow and similar cues are not usable either (high up, or over ground with no pattern, for example), the drone may switch to attitude mode (depending on the model). It then controls horizontal movement through tilt alone, so it has nothing to stop against when you let go, and it drifts downwind.

Hint: Stay calm and deal with it

First, don't panic: hold the drone with the sticks. The basic technique is to keep a small push in the direction opposite the drift. Then bring it down slowly in a wide area away from people and property. Do not force your way to the destination; put landing first, and follow the procedure in the user manual.

Try it yourself: You can try this scene yourself inside the lesson.

Exercises in this part (solved inside the lesson)

  • Holding a drone that drifts in attitude mode
  • Lose GPS, stay calm, and land

Summary

  • Position is fixed by finding distances from how long satellite signals take to arrive, as the point where the distances to several satellites overlap (at least four satellites, including the receiver's clock error).
  • Air pressure, magnetic and image cues each have strengths and weaknesses. Air pressure tells you changes in height, the compass tells you heading, and optical flow tells you motion.
  • Indoors, GNSS is often unusable, so you rely on cues from below such as optical flow. Don't rely on just one; combine them.
  • GNSS is disturbed by reflections, jamming and spoofing. If you notice signs such as the position suddenly jumping, don't push on: decide to land.
  • When GPS is lost and the drone switches to attitude mode, it does not stop when you let go of the sticks; it drifts with the wind. Hold it by pushing against the drift and land calmly.

At Lv2 you will express accuracy in numbers with DOP and RTK, calculate coordinate systems, distances and bearings, and check a waypoint flight plan with the linter.

Terms in this lesson

GNSS
The umbrella name for systems that measure your position from satellite signals, such as GPS (United States) and Michibiki (Japan). Short for Global Navigation Satellite System.
trilateration
A way to fix a position when you know the distances to three or more reference points: the position is where the circles (spheres) with those distances as radii meet.
dead reckoning
A way to find your current position by adding up the directions and distances traveled from a starting point. Measurement errors build up little by little.
barometric altitude
Height converted from the air pressure measured by a barometer. It tracks changes in height well, but its reference shifts when the weather changes the air pressure.
compass
A sensor that measures the direction of the Earth's magnetic field to find which way the drone is facing (its heading).
optical flow
A way to find how fast the drone is moving from how much the ground pattern moves in the camera image.
multipath
When a satellite signal bounces off a building or other object and arrives by a longer route. The measured distance grows and the position shifts.
jamming
Interference that transmits strong radio noise so that the weak satellite signals can no longer be received.
spoofing
Interference that sends fake satellite signals to make a receiver believe a wrong position or time.
magnetic interference
When the magnetic field of iron, electric currents or magnets disturbs the compass reading. Calibrate away from iron.
position hold
Control that keeps the drone in place when you let go of the sticks, by measuring its own position as it goes.
attitude mode
A mode that does not use GNSS position cues and controls horizontal movement only through the drone's tilt (many models still hold height with the barometer or similar). Let go and the wind carries the drone away.

Try it yourself

This page is the text of the lesson. The exercises and simulators run inside the lesson.

Go to the exercises of “How does a drone know where it is?”

Read this lesson in another language: 日本語 · Español · Français

Updated · The simulators are simplified models for education