# How the GPS System Works (Super-simplified with Battleship and The Da Vinci Code)

This post is adapted from a section I had to cut from an early draft of a book.

## Super-simplified explanation of the GPS system

I’m going to explain how the Global Positioning System works. But first we’re going to play a game and then read The Da Vinci Code.

## A quick game

This game is called “Og Hunt.” It’s a bit like the classic game, Battleship, but in this case you don’t just find out if you hit or missed the target, I’ll also tell you how far away you were.

We’ll play this game on graph paper, starting with a grid.

The Og is hidden somewhere in this grid, but you don’t know where. So you take a random guess, and say “B2.”

I tell you, “You missed. You were five squares away from the Og.”

Now you could just keep trying coordinates randomly, until you hit the Og, but this could take a lot of guesses. But you’re smarter than the average bear. So you pull out the compass you carry with you for just such an occasion, and you draw a circle with a radius of five, with the center at the point B2.

Since B2 was 5 squares away from the Og, you know your target must lie somewhere on that circle. Now you make a second guess. “B7.”

I tell you, “You missed. You are 3.16 squares away from the Og.”

You know you’re getting closer, but more importantly, you can draw another circle.

You know the Og must be somewhere along that circle you’ve just drawn, and it also must be on the first circle. The circles cross in two places, so the Og must be at one of those two intersections. Aha! One of the intersections lies outside the grid, so you know the Og must be at the other intersection, at E7.

“Hit! You found the Og!”

Well, that was fun! Now let’s get on with learning how the Global Positioning System works.

## Lots of satellites

The first part of the GPS system is 32 satellites, circling the earth in all sorts of different orbits so that there are always at least 3 of them overhead, no matter where on the globe you are. Each satellite is constantly transmitting a radio message with two things in it: exactly where in space the satellite is at that moment, and the precise time it sent the message.

The second part of the GPS system is the receiver. There are dedicated GPS receivers, but you can also find them in car navigation systems and in most smart phones. You may have one in your pocket right now.

## Bad science

Before we go on, let’s take a break and talk about how the GPS system doesn’t work, since there’s an awful lot of confusion about that. A good example of getting it wrong is in The Da Vinci Code:

“Look in your jacket’s left pocket,” Sophie said. “You’ll find proof they are watching you.”
Langdon felt his apprehension rising. Look in my pocket? It sounded like some kind of cheap magic trick.
“Just look.”
Bewildered, Langdon reached his hand into his tweed jacket’s left pocket – one he never used. Feeling around inside, he found nothing. What the devil did you expect? He began wondering if Sophie might just be insane after all. Then his fingers brushed something unexpected. Small and hard. Pinching the tiny object between his fingers, Langdon pulled it out and stared in astonishment. It was a metallic, button-shaped disk, about the size of a watch battery. He had never seen it before. “What the… ?”
“GPS tracking dot,” Sophie said. “Continuously transmits its location to a Global Positioning System satellite that DCPJ can monitor. We use them to monitor people’s locations. It’s accurate within two feet anywhere on the globe. They have you on an electronic leash. The agent who picked you up at the hotel slipped it inside your pocket before you left your room.”

A “GPS tracking dot” does not really exist, but the most important error in this scene is there’s a GPS receiver transmitting its location to a GPS satellite. In reality, it’s the other way around. The GPS satellites transmit their location to your GPS receiver. The GPS satellites don’t know where you are. A lot of movies and books make this mistake, so we won’t rip on Dan Brown much here.

## So how does your smartphone know where you are?

Let’s say you’re lost, so you pull out your smartphone. At this point, your phone is actually just as lost as you; it has no idea of where you are. So how does it find out? Your phone turns on its GPS receiver, which listens to the GPS satellites overhead, which are sending radio messages about where they are and what time it is. So now it knows where the satellites are, but it still doesn’t know where it is. But here the receiver does a very neat trick. The radio messages take a small amount of time to travel from the satellite to the receiver. By comparing the time it was when the message was sent, to the time when the receiver gets the message, it can figure out how far away it is from the satellite.

Does this situation look familiar? It should; it’s the Og hunt game we played earlier. In the Og hunt, we knew several fixed points (the previous guesses) and how far away the Og was from them.

In the case of the GPS system, the receiver knows the locations of several points in space (the satellites) and how far it is from each of them. Given that information, the GPS receiver can figure out where it is. Since we are dealing with three dimensions now, the distance from a single satellite is a sphere rather than a circle. If we have two satellites, the intersection of the two spheres gives us a circle, and the intersection of three spheres give us two points. One of those points is going to be inside the earth or out in space, so we can ignore that one, and the remaining point tells us where on earth we are.

It took your phone just a few seconds to do this. Now it can display a map and show you where you are.

In reality, the system’s a bit more complicated than this super-simplified example. Because the clock in your phone is not as accurate as the expensive atomic clock in the GPS satellite, the GPS reciever actually needs four satellites to get the initial location fix. After that, it only needs three. This is one reason it can take a moment for your phone to locate itself at first, but after that it gets faster.

Imagine if early explorers had GPS technology! Columbus might have realized he was in a new land instead of in India, where he thought he was. He might have named the land after himself, and instead of calling the people “Indians”, they would have been “Columbos”! Okay, maybe it’s just as well Columbus never had a GPS.

## One thought on “How the GPS System Works (Super-simplified with Battleship and The Da Vinci Code)”

1. Julie Q

Love this explanation. You mean The DaVinci code has flawed science? I thought it was just full of totally bogus art history. Apparently if you’re a good storyteller you can fake anything. But I’m glad your book is both an awesome story and scientifically accurate.