Wirebook

Wirebook › Lesson 9 of 18

How does a map know where you are?

About 7 minutes · hands-on · nothing you type leaves your browser unless a button says so

Open a map on a phone and a blue dot appears right where you're standing, even in the middle of a field. Nobody told the phone where you are. So how does it know? It listens to satellites shouting the time, and does some very clever maths with circles. Let's find a hidden phone the same way.

Find the hidden phone

A phone is hidden somewhere on this island. You can't see it, but three satellites can send it a message. Listen to them one at a time. Each message tells you how far away the phone is, which draws a ring. Want a challenge? Tap the map first to drop a guess pin.

ForestHilltopHarbourOld MillBeachMeadow Toy map: about 30 km across AHA!

Slide it to give the phone a cheap, slightly wrong clock, then listen again. Every millionth of a second wrong makes every ring 300 m too big or too small.

    This is a flattened toy. Real GPS satellites are about 20,200 km up, so real messages take about 0.07 seconds to arrive and the rings are really giant spheres in space. The maths is the same.

    Satellites that shout the time

    About 31 GPS satellites circle the Earth, roughly 20,200 km up, each going round twice a day. Every one of them carries atomic clocks, and all day and night it sends out the same kind of message: "I'm satellite number 12, here's exactly where I am, and the time right now is…"

    Your phone just listens. When a message arrives, the phone checks its own clock. The message was sent a tiny moment ago, and radio waves travel at the speed of light, about 300,000 km every second. So the delay tells the phone how far away that satellite is. You're somewhere on a giant ball around it. Hear a few satellites, and there's only one spot where all their balls meet. That's you. Working out a position from distances like this is called trilateration.

    A millionth of a second is 300 metres

    Here's the tricky bit. Radio covers about 300 metres in one millionth of a second. If a clock is wrong by even that much, every distance is 300 m out. The satellites' atomic clocks are fine, but your phone has a cheap clock that drifts. The answer is beautiful: listen to one more satellite than you'd need. On a flat map, three rings can only meet at one spot if the clock is right, so the phone tries clock corrections until they do, exactly like the Fix the clock button above. In the real, three-dimensional world you need four satellites: three for where you are, and one to fix the clock. Your phone usually hears many more.

    Einstein in your pocket. Clocks on GPS satellites tick slightly faster than clocks on the ground: about 38 millionths of a second a day, because gravity is weaker up there (Einstein worked this out). That sounds like nothing, but if engineers didn't correct for it, the blue dot would drift by roughly 10 km every day.

    Are the satellites spying on me?

    No. GPS only goes one way, like a lighthouse: the satellites send, and your phone listens. They have no idea who is listening, how many phones there are or where any of them are. Your phone works out its own position, quietly, by itself.

    What can share where you are is your phone, once it knows. Apps you allow to use your location can send it on to their servers, and photos can save the spot where they were taken. That's worth checking: look through which apps have location permission and switch off the ones that don't need it.

    Why does the blue dot wander?

    Phones don't only use satellites. Pick a place, then switch clues on and off and see how sure the phone can be. The bigger the ring, the less sure it is.

      Rough, typical figures. Real ones depend on the phone, the place and the weather in space (yes, that's a thing).

      The other clues your phone uses

      The blue dot comes with a pale circle around it. That circle isn't decoration: it's the phone being honest about how sure it is. Small circle, good clues. Big circle, best guess.

      Words from this lesson

      Earn your stamp

      Get all 3 right to collect the Maps & GPS stamp. Wrong answers are fine: just try again.

      1. How many satellites does a phone need to hear to work out where it is?

      2. Can a GPS satellite see where your phone is?

      3. Why is the blue dot often worse between tall buildings?

      Try another lesson

      1. 10How does a video app guess what you'll watch next?7 min · interactive
      2. 11How does face unlock know it's you?7 min · interactive
      3. 12How does a game remember where you got to?6 min · interactive