How does GPS work?

GPS is fundamentally a translation tool that converts time into distance. By measuring signal delays from multiple satellites and accounting for relativistic effects, your phone can pinpoint your location with incredible precision.
If you're like me, you might be entirely dependent on GPS to navigate the world. At some point, you may have caught yourself wondering during those panicked moments when an exit is coming up and your phone is recalibrating: how does my phone even know where I am?
The answer is in some ways simpler than you'd expect, and in other ways more complex. GPS is fundamentally a translation tool: it converts time into distance. A satellite sends a signal, your phone catches it, and the delay between those two events tells the phone exactly how far away the satellite is. Everything else is about making that measurement precise enough to be useful: accounting for bad clocks, satellite geometry, and eventually, Einstein's theories.
The Ruler
Every GPS measurement starts with a stopwatch. A satellite broadcasts a signal at the speed of light. Your phone receives it and checks how long the trip took. Multiply the travel time by the speed of light, and you get the distance.
This is the fundamental building block of GPS.
One Satellite, One Ring
Measuring a single satellite gives you a distance, but not a direction. If a signal takes a certain amount of time, you could be anywhere on a sphere around that satellite.
To visualize where you might be on Earth's surface, think of two soap bubbles touching. Where they overlap, they share a perfect circle. The satellite's signal is one sphere, and the Earth is the other. Where they intersect, you get a ring on the surface. You are somewhere on this ring, because every point on it is the same distance from the satellite.
This is a useful mental model, but GPS does not actually use the Earth's surface as a constraint. It solves for a full 3D position, including altitude, which is how it works for aircraft and spacecraft too.
Three Satellites, One Point
One ring isn't enough since you could be anywhere along it. A second satellite produces a second ring which crosses the first one at exactly two points. A third satellite produces a third ring, which passes through only one of those two points.
This process is called trilateration. Each satellite gives you one equation, and their intersection reveals your location.
Technically, three spheres intersect at two points. However, one of those points is usually in an impossible location (like deep inside the Earth or far out in space), so the receiver discards it, leaving one practical solution on the surface.
The Clock Problem and the 4th Satellite
There's a problem: the math assumes your phone knows the exact travel time. While satellites carry precise atomic clocks, your phone uses a cheap quartz clock. A discrepancy of even a microsecond leads to kilometers of error.
The fix is to add a fourth satellite. There is only one specific clock correction possible where all four spheres intersect at a single, perfect point. The 4th satellite gives the receiver enough information to find this offset and correct all measurements simultaneously. This is also why your phone's clock is so accurate—it's constantly synced to space-based atomic clocks.
The Relativity Tax
Even with four satellites, we must account for Einstein's theories. GPS faces two time distortions:
- Special Relativity (Speed): Fast-moving objects experience time more slowly. Satellites move fast enough that their clocks lose about 7 microseconds per day.
- General Relativity (Gravity): Gravity warps time; the further from Earth, the faster time ticks. At orbital altitudes, clocks gain about 45 microseconds per day.
Combined, satellite clocks run about 38 microseconds fast per day. Without correction, GPS would be off by 10km within a single day. Engineers compensate for this by building satellite clocks to tick slightly slower on the ground. GPS is a continuous proof that Einstein was right.
A Joint Effort
Modern receivers typically lock onto 8 to 12 satellites at once, using multiple constellations like GPS (USA), GLONASS (Russia), Galileo (EU), and BeiDou (China). More satellites allow the receiver to average out errors and handle "Geometric Dilution of Precision" (GDOP), where poor satellite placement creates uncertainty.
In cities, signals can bounce off buildings (multipath error), making the phone think you are further away. Modern chips use advanced filtering to mitigate this. It remains a modern miracle that your phone can pinpoint your location to within meters using light-speed signals from tens of thousands of kilometers away.
Source: Hacker News















