A position from timing
The Global Positioning System, usually called GPS, is a network of satellites run by the United States. Similar systems exist elsewhere, and the general term for all of them is global navigation satellite systems. Many modern receivers can use several at once.
The core idea is surprisingly simple: the satellites do not look at you. They constantly broadcast radio signals that contain two things, the exact time the signal was sent and the satellite’s own position. A receiver on the ground, such as a phone, listens and does the math.
Turning time into distance
Radio waves travel at the speed of light, roughly 300,000 kilometers per second. If a receiver knows when a signal left a satellite and when it arrived, it can find the travel time. Distance is speed multiplied by time.
The signals take only a fraction of a second to arrive. A satellite signal might travel for roughly a fifteenth of a second, so the timing has to be extremely fine. An error of one microsecond, which is one millionth of a second, would translate into a distance error of about 300 meters, since light covers about 300 meters in that time. For useful accuracy, the clocks must be precise to far better than that.
Trilateration
Knowing your distance from one satellite places you somewhere on the surface of an imaginary sphere around it. A second satellite gives another sphere, and the two spheres intersect in a circle. A third sphere narrows it to two points, and one of those is usually far out in space and can be ignored. This process of finding position from distances is called trilateration. It is different from triangulation, which uses angles.
Why four satellites
There is a catch. The satellites carry highly accurate atomic clocks, but a phone has a small, inexpensive clock that is not nearly accurate enough. Its timing error would spoil the distance measurements.
The solution is to treat the receiver’s clock error as one more unknown. With three position unknowns (for example latitude, longitude and altitude) plus one clock unknown, there are four unknowns, so a receiver needs signals from at least four satellites. Solving the equations gives both the position and a corrected time. This is a quiet side benefit: GPS also serves as a widely used source of accurate time for networks and other systems.
The satellites
The GPS constellation consists of around thirty operating satellites. They orbit at an altitude of roughly 20,000 kilometers, much higher than the International Space Station, and each completes an orbit about twice a day. They are arranged so that, in most open places, several are above the horizon at any moment. Ground stations monitor them and send updates to keep their clocks and orbital information accurate.
A key point is that a standard receiver only listens. It does not transmit anything to the satellites, so the satellites do not know where you are. Any location sharing with other people or services is a separate step that happens through other connections.
Relativity and GPS
GPS is often cited as a real-world use of relativity. According to Einstein’s theory, clocks run at different rates depending on speed and on gravity. The satellites move fast relative to the ground, which slows their clocks slightly, but they are also farther from Earth’s gravity, which makes them run faster. The gravitational effect is larger, so the satellite clocks gain a small amount of time, on the order of tens of microseconds per day. If uncorrected, that would add up to errors of kilometers within a day. The system is designed to compensate for this, and the same ideas appear in the story of the theory of gravity from Newton to Einstein.
What limits accuracy
In practice, a consumer receiver is typically accurate to within a few meters under good conditions. Several things can reduce this.
- The atmosphere. The ionosphere and lower atmosphere slightly slow and bend radio signals. Receivers use models and, in some cases, signals at two frequencies to correct for it.
- Reflections. Signals bouncing off tall buildings or terrain can arrive late and create errors, which is why accuracy can drop in cities.
- Blocked signals. The signals are weak and do not pass through buildings, tunnels or dense cover well, so indoor positioning is often poor.
- Satellite geometry. Satellites that are bunched together in the sky give weaker results than ones spread widely.
Some systems add corrections from ground stations or other sources to improve accuracy to much smaller distances, which is used in surveying and some other professional work.
Maps are separate
GPS provides coordinates, not directions. The street map, route and spoken instructions come from software and map data on your device or online. When a phone shows a moving dot on a map, it is combining position fixes from satellites with map information, and often with other clues such as nearby wireless networks and motion sensors.