The Physics of GPS: Atomic Clocks & Relativity
When you click the "Find My Location" button, you aren't just running a piece of JavaScript. You are instantly communicating with a multi-billion dollar constellation of satellites utilizing the most profound physics discoveries of the 20th century.
GPS does not send a map to your phone. It sends a timestamp. Here is how that works.
1. The Geometry of Trilateration
Orbiting 12,500 miles above your head are roughly 31 active GPS satellites. Each one is equipped with an incredibly precise atomic clock. These satellites constantly broadcast radio signals in all directions containing two pieces of data:
- The exact location of the satellite in orbit.
- The exact time the signal was transmitted.
Because radio waves travel at the speed of light (186,000 miles per second), your phone notes the exact time the signal arrives, compares it to the time it was sent, and multiplies that difference by the speed of light to calculate exactly how far away the satellite is.
By locking onto four different satellites, your phone draws four intersecting spheres of distance. Where those four spheres meet is where you are standing. This is called Trilateration.
2. Einstein's Intervention
Because light moves so fast, an error of a single microsecond (one millionth of a second) in the atomic clocks would result in your location being off by nearly 1,000 feet. This brings us to Albert Einstein.
Einstein proved two things that make building a GPS system a nightmare:
- Special Relativity: Because the satellites are moving at 8,700 mph, their clocks tick slower than clocks on Earth (losing about 7 microseconds a day).
- General Relativity: Because the satellites are 12,500 miles away from Earth's gravity well, spacetime is less warped, causing their clocks to tick faster than clocks on Earth (gaining about 45 microseconds a day).
The net difference is that GPS satellite clocks tick 38 microseconds faster per day than clocks on the ground. If software engineers did not mathematically correct this relativistic drift every single day, GPS would become completely useless in less than a week.
Slide the bar to see what would happen to your location accuracy if we ignored Einstein's math.
3. The Hardware Inside Your Phone
Your smartphone does not have an atomic clock inside it—it uses a cheap quartz clock. So how does it stay perfectly synced with the satellites?
This is why your phone needs to connect to at least four satellites instead of three. It uses the first three satellites to calculate your X, Y, and Z coordinates (Latitude, Longitude, and Altitude). It uses the fourth satellite signal purely to correct the tiny errors in your phone's internal clock, keeping your device perfectly synchronized with military-grade atomic time.