Answer Geek: How GPS Works

Q U E S T I O N: I have a handheld GPS device that can tell me, within a few dozen yards, where on earth I am. Can you tell me how on earth it works? — Justin D.

A N S W E R: Actually, Justin, much of the work of GPS takes place not here on earth, but out in space.

To pinpoint your location somewhere — anywhere — on the face of the earth, the Global Positioning System uses a network of 24 satellites, each of which circles the earth twice a day, from an orbit about 10,900 miles high in space. Placed in orbit by the United States Department of Defense, they are the backbone of a system that can pinpoint your location with remarkable accuracy.

GPS is also the culmination of a centuries-long quest by humankind to develop tools for navigation that allow us to get from one place to another without fear of getting lost. Among the most important navigational inventions in human history were the compass, which made it possible to know in which general direction one was heading, and the sextant, which helped determine one's latitudinal location. With the invention of the chronometer in 1761, which can calculate both latitude and longitude, sailors could finally cross oceans with some certainty that they would end up at their preferred destination.

Radio Days Early in the 20th century, radio-based navigation systems superceded those navigational wonders. Originally built for military purposes, the Global Positioning System was put into place beginning in the mid-1970s. A decade later the system saw civilian uses: now GPS not only makes it even easier for modern sailors to navigate their way across the seven seas, but it also helps hikers find their way in the woods and road-weary travelers negotiate their way to the motel of their choice at the end of a long day on the highways.

Here’s how it works: each one of those 24 satellites — which weighs in at about a ton and measures 17 feet across with its solar panels fully unfurled — constantly transmits radio signals earthward. Those signals, which travel at the speed of light, include timing and positioning data. The timing information is crucial for the GPS receiver to figure out how far it is from the satellite — this is the first step to getting an accurate fix on your location. Time-keeping accuracy is so critical that each satellite is equipped with not one, not two, not even three, but four, count ‘em, four atomic clocks. Those clocks allow the satellite to measure time with a margin of error that is three nanoseconds or less. How accurate is that, you ask? How about 0.000000003 of a second?

To measure the distance from your GPS receiver to the satellite, the receiver must know how long it took for the signal to make the trip. That means it has to know both when the signal was sent and when it was received. The latter is easy. Figuring out when the signal was sent is a little trickier. To do that, a nifty code-matching scheme is used. Satellites send out something called “pseudo random code,” which is a very long pattern of 0s and 1s. Your GPS receiver — and everyone else’s on the planet — runs that same code in synchronization with the satellites. When a satellite’s signal reaches a receiver, it lags behind the portion of the pseudo random code currently running on the receiver. (Even at the speed of light, it takes somewhere in the neighborhood of .06 seconds for a radio signal to make the trip.) By looking back to find out when it played the portion of the code that it received from the satellite, the receiver can calculate the length of time it took for the transmission to arrive, and then calculate the distance.

A Network of Satellites Let’s say that the satellite in question is directly overhead, so your GPS receiver has calculated that it is 10,900 miles away. Where are you? Who knows? Strictly speaking, you could be anywhere on a sphere with a radius of 10,900 miles that has the satellite at its center. Even if you throw out all of the points on that sphere that are out in space, that still leaves a lot of places that you could be — and it's certainly not enough information to get you from the rental car place at the Los Angeles airport to Disney Land.

But suppose we added data from a second satellite. Now, suddenly, there are two spheres, and they overlap in a nice neat circle. Add a third, and the overlap consists of just two points. Add a fourth and suddenly that GPS device can tell you not only where you are, but at what altitude.

That’s why there are 24 satellites. The GPS satellite array, also called a constellation, was designed so that at least four satellites are “visible” to a receiver at any given time. In practice, there’s a good chance that your GPS receiver is monitoring signals from eight satellites. (See interactive at side for a graphical explainer.)

There is one other neat trick that is worth discussing. Remember those atomic clocks? What about the GPS receivers? If timing is so important — remember, we are talking about measuring radio signals traveling at the speed of light — does that mean there’s an atomic clock tucked away in every GPS receiver?

The answer, of course, is no. After all, a decent atomic clock is going to set you back somewhere in the neighborhood of $100,000. Instead, most GPS receivers use standard quartz clocks. But that introduces significant timing errors, and it means that the initial distance measurements aren’t entirely accurate, resulting in a set of spheres that don’t actually overlap at a single point. Fortunately, because the incoming signals are measured with the same clock, the errors are proportional to each other. The GPS receiver is designed to adjust the relative sizes of the four sphere until they do overlap at a single point.

The Global Positioning System does have its limits. Satellites transmit very low-power signals which don’t pass through walls, rocks, city buildings, or even thickly wooded forests. So it helps if you are out in the open. GPS isn’t 100 percent accurate either. Everything from atmospheric conditions to the position of the satellites relative to one another to small errors in the atomic clocks can affect the accuracy of the system. And in the GPS business, small errors add up: a single nanosecond difference in those atomic clocks up in space translates to about a 12 inches of error down here on the ground. It doesn’t take much before your car’s GPS navigation device is telling you that you are on Fourth Avenue when you are really on First.

But for the average user, the most important reason for GPS inaccuracy went away last December when Bill Clinton ordered the U.S. military to stop intentionally scrambling the signal. Before that date, the Department of Defense, which maintains the system, introduced artificial clock errors into satellite signals in the name of national security. That limited the accuracy to about 100 yards for most users. Eliminating the artificial error resulted in an instant 10-fold improvement in the accuracy of the system.

So far, at least, the national security still seems to be intact, and those of us with GPS units are all a quite a bit more location-savvy with our appointments and on our travels.

Todd Campbell is a writer and Internet consultant living in Seattle. The Answer Geek appears weekly, usually on Thursdays.