Live model · GPS

How GPS Actually Works

Each GPS satellite broadcasts where it is and exactly when it sent its signal. Your phone times each arrival by its own cheap clock and multiplies by the speed of light to get a distance. That clock is off, so every distance is wrong by the same amount; a fourth satellite lets the phone solve for both.

A GPS fix, from travel times to where you stand

Satellites G05, G13, G24 each broadcast where they are and exactly when they sent their signal. Your phone times each signal's arrival by its own cheap clock, which is +1,000 µs off, and multiplies travel time by the speed of light to get a range.
StopGPS fix
Satellites in viewPhone clock off (microseconds)
Satellites3Phone clock off by+1,000 µs

Earth and the satellites, in thousands of km

G05G13G24You

Near you, in km

-1,000-800-600-400-20002004006008001,000-1,000-50005001,000km eastkm upYou

What the phone measured

SatelliteSignal took (phone's clock)RangeMiss at the fix
G05
G13
G24
  • CH4 Measured range
  • CH1 Where you could be

Watch the Python behind this model run, line by line

How to read the stage

The stage is a flat slice through the Earth, so a position is two numbers and three satellites do what four do on the globe. Your phone's clock runs 1,000 µs fast, which makes every range 299.8 km too long: G05 reads 23,498.2 km against a true 23,198.4 km. Starting from the Earth's center, the fix closes in over 5 steps and finishes under a millimeter from you, with the clock error found too.

Why it takes a fourth satellite

Light covers about 300 meters in a microsecond. The satellites carry atomic clocks synchronized with each other, but a phone has a quartz clock, nowhere near good enough. So the receiver treats its clock error as an unknown: three for position on the globe plus one for the clock makes four, and four ranges. The constellation is laid out so at least four satellites are in view from virtually anywhere on Earth.

Where the satellites sit matters

Every range carries a little noise, and the satellites' directions decide how much it grows. In the second stage, three satellites bunched overhead turn 3 m of noise into 11.9 m of error east–west and 35.8 m up–down: a dilution of precision of 4.18 and 13.17. Spread the same three across the sky and it drops to 2.4 m and 7 m. Ranges that cross at wide angles pin a point down.

The same noise, satellites bunched or spread

Satellites G12, G13, G15. Every range carries a little noise, about 3 m, from the air the signal crosses and the receiver itself. Solve the fix 120 times, each with fresh noise, and see where the fixes land.
StopSatellite geometry
Satellites in viewNoise per range (m)Seed
SatellitesG12 G13 G15DOP east4.18DOP up13.17

Your sky: where each signal comes from

G12G13G15You

0 fixes, in meters from where you stand

-200-150-100-50050100150200-200-1000100200m eastm up

Typical size (RMS), meters

  • CH1 A noisy fix

Watch the Python behind this model run, line by line

Why it drifts between tall buildings

In a city, a building can hide a satellite while its signal still arrives, bounced off glass across the street and too long. In the third stage, a tower 60 m away adds 108.3 m to G05's range and pulls the fix 122.3 m off, and the biggest miss lands on G12, not G05. Leaving each satellite out in turn finds the culprit: only the four without G05 agree.

A bounced signal, and the satellite left out

A block hides G05, low in the sky, but its signal still reaches you: it bounces off a glass tower 60 m across the street. That detour adds 108.3 m to its range, and the phone can't tell a bounced signal from a direct one.
StopMultipath
Satellite the block hidesGlass tower across the street (m)
Bounce adds108.3 mFix off by—

Your street, side on, in meters

GlassG12G15G21G24G05 blocked+108.3 mYou

Where the fix lands, in meters from you

-125-100-75-50-250255075100125-100-50050100m eastm upYou

How far each range misses the fix from all five

Leave one out, fix from the other four

Left outThe four miss by (RMS)
G05
G12
G15
G21
G24
  • CH1 A direct signal

Watch the Python behind this model run, line by line

What the model leaves out

A flat slice with a phone standing still, and ranges with no error but the clock's, a bounce, or noise. Real signals also slow down in the air: receivers correct the ionosphere's delay with a model broadcast in the navigation message and the troposphere's with one in software, and small errors in the satellites' clocks and orbits remain. A fix in a real phone is three dimensions and four or more satellites.

Questions

How accurate is the GPS on my phone?
The U.S. government puts GPS-enabled smartphones within a 4.9 m radius under open sky, typically. Accuracy gets worse near buildings, bridges and trees, indoors, and wherever signals bounce off walls before reaching you.
Does GPS need cell service or the internet?
No. GPS doesn't need you to transmit anything, and it works without phone or internet reception: the satellites broadcast and your phone listens. When a network is available, phones download the satellites' orbit data over it instead of the slow satellite link, which gets a first fix faster. That's assisted GPS.
What does relativity have to do with GPS?
Up at GPS altitude, gravity's weaker pull makes the satellites' clocks run faster than clocks on the ground, and their speed slows them a little. Net, they gain 4.4647 parts in 10 billion, about 38.6 µs a day, or 11.6 km of range. The clocks are set slow to cancel it.
How many GPS satellites are there?
31 operational satellites as of July 2023, in six orbital planes about 20,200 km up, each circling the Earth twice a day. They're arranged so at least four are in view from virtually any point on the planet.

More of how it works