Engineering·Geolocation
How GPS Knows Where You Are
Open the map app on your phone, and a blue dot appears within a few seconds, usually within ten or fifteen feet of where you actually are. The phone has no compass needle, no landmarks, no view of the sky from inside your pocket. How does it know?
The answer lives about 12,500 miles above your head. Roughly thirty satellites orbit the Earth as part of the Global Positioning System. Each one constantly broadcasts a radio signal that says, in effect, "This is satellite number seven. The time on my clock is exactly this." That message travels down through space at the speed of light, which is fast but not instant. It takes about a tenth of a second to reach the ground.
Your phone listens for these messages. When it catches one, it compares the time stamp inside the message to its own clock. The difference is how long the signal spent in flight. Multiply that travel time by the speed of light, and you get a distance: the phone is, say, 12,800 miles from satellite seven.
Knowing your distance from one satellite is not enough. It only tells you that you are somewhere on a giant invisible sphere, 12,800 miles in radius, centered on that satellite. You could be anywhere on its surface. So your phone listens to a second satellite. Now you are on two spheres at once, and two spheres only overlap along a single ring. Add a third satellite, and the three spheres intersect at just two points. One of those points is usually out in space, so the other one is you. This technique of using overlapping distance measurements is called **trilateration**.
Three satellites should be enough, then. But there is a catch, and it is the part most explanations skip. The math above assumed your phone's clock is perfectly synced with the satellite's clock. It is not. The satellites carry **atomic clocks**, accurate to a billionth of a second. Your phone has a cheap quartz clock that drifts. If your clock is off by even one-thousandth of a second, your distance calculation is off by about 186 miles, because light moves that far in a millisecond. Your blue dot would land in the next state.
This is why GPS uses a fourth satellite. With three satellites and a perfect clock, you would get one location. With four satellites and an imperfect clock, the receiver can solve a system of equations for four unknowns: your latitude, your longitude, your altitude, and the exact error in your clock. The fourth satellite is not really there to pin down where you are in space. It is there to tell your phone what time it is, accurately enough that the other three measurements become trustworthy.
So the blue dot is not magic, and it is not really about maps. It is a stopwatch problem. Four faraway clocks shout the time. Your phone listens, notices how late each shout arrives, and works backward to the only place on Earth where being that late from each of those four directions makes sense.
Vocabulary
- trilateration
- A method of finding a location by measuring its distance from three or more known points and finding where those distance ranges overlap.
- atomic clocks
- Extremely precise clocks that keep time by measuring the vibrations of atoms; they are accurate to within about a billionth of a second.
- speed of light
- The speed at which radio signals and light travel through empty space: about 186,000 miles per second. It is fast but not instant.
Check your understanding
According to the passage, about how far is a GPS satellite from the Earth's surface?
Closing question
GPS depends on the speed of light being constant and predictable. What might happen to your location accuracy if a signal had to pass through a thick layer of the atmosphere that slowed it down slightly, and how could engineers correct for it?
More in engineering
Centralized and Distributed Systems: Two Ways to Build at Scale
Imagine a busy library with a single front desk. Every borrower checks books in and out at one counter, where one librarian holds the only ledger. The system is easy to understand: there is exactly on…
4 min · comparison
How a Heat Engine Turns Temperature Differences into Work
Hold a kettle on a hot stove and lift its whistling lid: the steam that hisses out carries energy, and if you channeled that steam against a paddle, the paddle would spin.
3 min · foundation
How a Microwave Heats Food
Open the door of a microwave and there is nothing inside but a glass tray and a metal box.
3 min · foundation