Neomano
ES
← Back to home
Science & Tech·Curiosities··6 min read

How GPS Works and Why It Knows Where You Are

Your phone's GPS pinpoints you thanks to satellites 20,000 km up and atomic clocks. Here is how that everyday magic actually works, step by step.

How GPS Works and Why It Knows Where You Are

You open the map on your phone and there it is: a blue dot that is you, blinking over the exact street you are walking down. It doesn't matter whether you are in a big city, in the middle of the ocean or lost on an unfamiliar road: within seconds the device knows where you are to within a few meters. Behind that everyday gesture lies one of the most astonishing machines ever built: a network of satellites orbiting 20,000 kilometers up, atomic clocks that measure time in billionths of a second, and even a correction based on Einstein's theory of relativity. This is how GPS works… and why it is far more ingenious than it looks.

What GPS actually is

GPS stands for Global Positioning System. It is a network of satellites operated by the United States —today under the Space Force— that broadcasts radio signals from space so that any receiver on Earth can work out its own position. The remarkable thing is that the system is one-way: the satellites only transmit, they never receive. Your phone does not «ask» any satellite for anything; it simply listens to what falls from the sky and does the math on its own. That is why GPS can serve an unlimited number of users at once without ever getting overloaded.

The constellation consists of at least 24 operational satellites (in practice there are usually more than 30), spread across six orbits so that, from any point on the planet at any time, at least four are always in view. They fly about 20,200 kilometers up, in what is called medium Earth orbit, and circle the world twice a day. Each one carries its most valuable treasure on board: several atomic clocks, so precise that they drift by only a few nanoseconds, that is, billionths of a second.

How it knows where you are: trilateration

Here is the heart of the trick. Each satellite endlessly broadcasts a message that says, in essence, two things: «I am satellite so-and-so, I am at this exact position» and «this message left at this precise instant». Your phone receives that signal a little later, because radio waves, even though they travel at the speed of light (about 300,000 km per second), take a measurable amount of time to cross those 20,000 kilometers. By multiplying that delay by the speed of light, the receiver works out how far it is from that satellite.

With the distance to a single satellite, you know you are somewhere on a huge sphere around it. With two satellites, it narrows to the circle where the two spheres intersect. With three, those circles cross at just two points, and one of them is usually out in space or inside the Earth, so it rules itself out. This method of crossing distances is called trilateration (not «triangulation», which measures angles and is a different thing). In theory three satellites would be enough, but in practice you need a fourth, for a beautiful reason.

Your phone's clock is good, but it is no atomic clock: an error of one millionth of a second would translate into a 300-meter error in your position. The solution is elegant: with the signal from a fourth satellite, the receiver has enough equations to solve at once for both your position and the exact time. In other words, GPS not only tells you where you are, it turns your cheap phone into a stopwatch almost as accurate as an atomic clock. It is the same precision logic that, on another scale, let sailors navigate for centuries thanks to the history of the compass and the stars.

The detail almost nobody knows: Einstein in your pocket

Now comes the part that tends to leave people open-mouthed. For GPS to work, you have to correct for the effects of Einstein's theory of relativity. This is no theoretical decoration: without that correction, the system would become useless within minutes.

Two things happen at once. By special relativity, because the satellites move so fast relative to us, their atomic clocks should run slow by about 7 microseconds a day. But by general relativity, because they are far from Earth where gravity is weaker, their clocks should run fast by about 45 microseconds a day. The net result is that the satellites' clocks run about 38 microseconds faster each day than clocks on the surface.

Thirty-eight microseconds sounds like nothing. But remember that here time turns into distance at the speed of light: without correcting that mismatch, the position error would grow by roughly 10 kilometers a day. Your map would place you in the wrong region before lunch. That is why the satellites' clocks come factory-tuned to «tick» a little more slowly, so that once up there they run in sync with Earth. Every time you use GPS you are confirming, without knowing it, that Einstein was right.

From a Sputnik beep to your pocket

The idea was born almost by accident. When the Soviet Union launched Sputnik in 1957, some physicists at Johns Hopkins University started listening to its radio beep and noticed something: the frequency of the signal rose as the satellite approached and fell as it moved away, the well-known Doppler effect. With that they could work out the satellite's orbit from the ground. And then someone flipped the idea around: if knowing the orbit lets you locate the listener, then a satellite of known position could be used to locate someone on the ground.

Out of that insight came first Transit, a system the U.S. Navy used from the 1960s to guide submarines. Modern GPS, named Navstar, began construction in the 1970s: the first satellite launched in 1978 and the constellation was complete by the mid-1990s. For years it was military-only, and civilian signals were deliberately degraded by a mechanism called Selective Availability, which injected an error of tens of meters. That ended in the year 2000, when the United States switched off the degradation and, overnight, civilian GPS became ten times more accurate. That was the real big bang of car navigators, map apps and the blue dot you now take for granted.

Why your phone locates you so fast

If GPS depends on listening to distant, faint satellites, why does your phone locate you almost instantly, even inside a building? Thanks to a couple of helpers. The first is called A-GPS (assisted GPS): instead of waiting for the receiver to slowly download from the sky where each satellite is, the phone pulls that data over the internet in a second and uses nearby cell towers and WiFi to get a rough idea of where you are. With that hint, finding the satellites is much faster.

The second is that your phone no longer listens to the American GPS alone. Modern chips also hear Russia's GLONASS, Europe's Galileo and China's BeiDou. The whole set is called GNSS, and it means that at any moment your phone may be combining signals from more than two dozen satellites belonging to four different countries. More satellites in view means more accuracy and fewer «gaps» between buildings. It is, like the Bluetooth that connects your earbuds, one of those technologies we use a hundred times a day without giving a thought to the colossal engineering behind them.

The next time you open the map, remember everything that had to happen for that blue dot to appear: a constellation inherited from the Cold War, atomic clocks flying at 14,000 km/h, a correction signed off by Einstein, and signals that crossed 20,000 kilometers of empty space to find you. Not bad for something we check even to avoid taking the shortest-looking route on a flight map.

References

  1. «Global Positioning System», Wikipedia. en.wikipedia.org
  2. «Real-World Relativity: The GPS Navigation System», Ohio State University (R. Pogge). astronomy.ohio-state.edu
  3. «Brief History of GPS», The Aerospace Corporation. aerospace.org
  4. «GPS.gov: How GPS Works», National Coordination Office for Space-Based PNT. gps.gov

Do you enjoy these everyday technologies almost nobody understands? Continue with how Bluetooth works or explore the whole science & tech section.

ShareCopied!

You may also like

Comments

Sign in with GitHub to comment.
Advertising

From the author · Free software

PaloSanto Solutions Enterprise IP telephony with free software

Visit PaloSanto