Learn › Explainers › How GPS works: satellites, clocks and a little relativity
How GPS works: satellites, clocks and a little relativity
GPS does not send anything to satellites. Your phone just listens, and does some clever geometry with the time signals it hears.
When your phone shows a blue dot on a map, it has worked out its position using signals from satellites about 20,000 kilometres overhead. The satellites do not know where you are. They simply broadcast, over and over, a message that says in effect: this is where I am and this is the exact time I sent this message. Everything else happens in your phone.
Measuring distance with time
Radio waves travel at the speed of light, roughly 300,000 kilometres per second. If your phone knows when a signal left a satellite and when it arrived, it can work out how far the signal travelled by multiplying the travel time by the speed of light. A signal from a GPS satellite takes about 67 to 90 thousandths of a second to arrive. A timing error of just one millionth of a second would put the distance off by about 300 metres, so the time measurements have to be extremely precise.
Trilateration
One distance tells you that you are somewhere on a huge sphere centred on the satellite. A second satellite narrows it to a circle where two spheres intersect. A third narrows it to two points, and one of them is usually far out in space or underground, so it can be ignored. This method of finding a position from distances is called trilateration. It is different from triangulation, which uses angles.
Why you need a fourth satellite
The satellites carry very accurate atomic clocks. Your phone does not: it has a cheap quartz clock that drifts. That would ruin the distance measurements. The fix is clever. Treat your phone's clock error as one more unknown to solve for. With three position unknowns (latitude, longitude, altitude) and one clock unknown, you need four satellites. Your receiver finds the position and time correction that make all four measurements agree. As a bonus, this means your phone ends up with a very accurate time too.
The constellation
The US GPS system has around thirty operating satellites in medium Earth orbit, each circling the planet about twice a day. They are arranged so that at least four are in view from almost anywhere on Earth's surface at any time. Other countries have their own systems: Russia's GLONASS, Europe's Galileo and China's BeiDou. Modern phones often use several systems at once, which improves accuracy and speed. Together they are called GNSS, short for global navigation satellite systems.
Relativity: Einstein in your pocket
GPS is one of the best everyday examples of relativity. Two effects change the satellite clocks compared with clocks on the ground. Because the satellites move quickly, special relativity says their clocks tick slightly slower, by about 7 microseconds per day. Because they are higher up where gravity is weaker, general relativity says their clocks tick faster, by about 45 microseconds per day. The net effect is that the satellite clocks run fast by roughly 38 microseconds per day.
That sounds tiny, but if it were not corrected, position errors would build up by about ten kilometres every day. Engineers deliberately set the satellite clocks to tick slightly slow before launch so that, once in orbit, they match time on the ground.
What limits accuracy
A phone's GPS is typically accurate to a few metres in open sky. Tall buildings can reflect signals, so the receiver measures a longer path than the real one, which is why your dot can drift in a city. The atmosphere also slows the signals slightly, and receivers correct for this. Specialist equipment can reach centimetre-level accuracy using extra reference stations, which is how surveyors and some tractors steer themselves.