How does your phone know where it is?

You land in a town you have never visited, and neither has your phone. You open a map, and two seconds later a blue dot appears, sitting exactly on top of you. Nobody typed anything in, and the phone asked nobody where it was. So where did that dot come from?
It came from listening. High above you, a fleet of satellites is shouting the time, over and over, at nobody in particular. Your phone never answers. It works out where it is from how late those shouts arrive.
Every satellite is shouting the time
Thirty-odd navigation satellites are up there, arranged so that at least four sit above your head wherever you stand. Engineers call a fleet like that a constellation. Each one circles the Earth 20,200 km(12,600 mi) up, further straight upward than the whole Earth is wide.
Each carries a transmitter that never stops. Its message travels as radio waves, made of the same stuff as light and moving exactly as fast.
The message itself is dull. It names the satellite, gives its position in the sky, and — this is the whole trick — stamps the precise instant it was sent.
Nothing in it mentions you, and nothing in it possibly could. The satellite broadcasts identical words to an empty ocean and to your bedroom ceiling. What locates you is the delay.
A delay is a distance
Your phone reads the instant stamped inside the message, then checks its own clock for the instant it landed. The difference between them is the trip time.
Radio waves cover about 300,000 kilometers every second, the speed of light, and nothing in the universe travels faster. Multiply the trip time by that speed and out comes your distance from the satellite.
A satellite directly overhead reaches you in about seven hundredths of a second, quicker than a blink.
Which is why the timing is unforgiving. Light covers 30 cm(12 in) in one nanosecond, meaning one billionth of a second — a school ruler’s length per nanosecond.
Try this now. Hold an arm out and look at your thumb, two rulers away. The light bouncing off it left two nanoseconds ago, so you have never once seen your thumb in the present.
That distance is not a position. It says only that you are somewhere on the skin of a gigantic invisible bubble, with the satellite at its center.
Three bubbles meet at one point
One distance is an enormous amount of nowhere.
A second satellite draws a second bubble, and two overlapping bubbles cross along a ring. You are somewhere on that ring, a much smaller amount of nowhere.
A third bubble cuts the ring at exactly two points. One is your street; the other is usually far out in space, so your phone discards it without hesitating.

Locating something from distances alone is called trilateration. It needs no map and no landmarks, only known centers and known lengths.
Three satellites, three distances, one position. That would settle it, except that each distance came from a subtraction, and one of its two clocks lives in your pocket.
The clock in your phone is not good enough
Your phone keeps time with a quartz crystal, a sliver of mineral that vibrates at a steady rate when electricity pushes through it.
How far that clock sits from the truth right now is its clock error, and nobody knows the number, including the phone.
A cheap crystal is no scandal. It is tiny, and good enough to say it is half past four.
A single nanosecond of error moves you a ruler’s length. A millionth of a second moves you 300 m(1,000 ft), enough to plant your blue dot on the wrong street. An ordinary quartz crystal is nowhere near that accurate.
Here is what rescues everything: the error is shared. Every distance comes from the same wrong clock at the same instant, so every bubble is too big by the same amount.
Bubbles all too big by the same amount do not cross at one point. They cross each other three times instead, boxing in a small triangle. Your phone now holds three bubbles, a triangle, and no idea what time it is.
The fourth satellite tells your phone the time
Suppose the phone estimates its clock is running one hundredth of a second fast. It subtracts that hundredth from all three trip times, the bubbles shrink together, and the triangle shrinks with them. Guess too generously and they shrink past each other, and it opens up again on the far side.
The trouble is that heaps of readings will squeeze that triangle to a point, each in a different place. Three bubbles are too easy to please.
Four are not. Add a fourth satellite and exactly one reading in all of time pinches four skins onto a single point. That reading is the correct one, and the geometry has handed your phone the time as well as the place.
Your phone cannot know what time it is until it knows where it is. Both answers drop out of the same arithmetic, or neither does.
So the phone settles two puzzles in one stroke, then begins the whole calculation again a second later. Nothing overhead learned a thing about you.
Nothing up there is looking down at you
Read the chain backwards and notice what your phone never did. It never transmitted anything. That part of it can only receive.
The satellites, then, are gloriously simple: they fly, and they shout the time. Which loads all the difficulty onto one thing. That shout has to carry a time accurate to a few billionths of a second, and the story of how anyone managed it begins with a beep.
First they found a satellite, then they flipped it around
Nothing built by people had circled the Earth before the autumn of 1957, when your grandparents were babies or not yet born. Then the Soviet Union launched Sputnik 1, and it beeped.

Two physicists at the Applied Physics Laboratory in Maryland, William Guier and George Weiffenbach, recorded those beeps as it passed over. The pitch climbed as it approached and fell as it fled, the way a siren does. From that slide alone, in one pass, they calculated its entire path.
In March 1958 their research director, Frank McClure, asked it backwards. If a stationary receiver could find a satellite, a satellite could find the receiver. That flip became Transit, the first navigation system built from spacecraft; its first working satellite reached orbit on 13 April 1960.
Only one Transit satellite was overhead at a time, so a ship near the equator waited hours, and an American submarine surfaced an antenna to catch the pass. Transit was slow, and no blue dot was going to appear in two seconds.
The clocks had to be invented first
The escape was to broadcast the time instead of the pitch. Roger Easton, at the Naval Research Laboratory, spent years arguing for satellites that carried extraordinary clocks and broadcast what they read. His first two prototypes flew in 1967 and 1969.
Then everything stalled for the dullest of reasons: the clocks did not exist. A clock accurate to a few billionths of a second is an atomic clock, counting the vibration of one particular kind of atom instead of a crystal. Every navigation satellite now carries several, some cesium and some rubidium.
One oddity remained. An orbiting clock ticks at a slightly different rate from one on the ground, which is relativity and a whole separate article. So these are built to run a hair slow, and come right once they are up there.
The idea arrived in 1958; the first satellite of today’s system flew in 1978. What finally made it work was a better clock, and the arithmetic fits on a sheet of paper.
Draw the bubbles on a sheet of paper

You were told neither the hidden dot nor the number, and walked off with both. Only the correct amount of shrinking makes three circles agree.
Count what you did not know: two directions across the paper, plus the secret number. Three unknowns needed three circles. Your phone has a fourth unknown — its height above the ground — so it needs a fourth bubble.
Your phone is only ever listening
Go back to the unfamiliar town and the dot that landed in two seconds. Nothing was looked up. Nothing was asked. Four machines that have never heard of you passed overhead, each repeating the dull sentence it has repeated for years. Your phone caught four copies of it, a few hundredths of a second late.
The piece hiding in plain sight is the clock. A phone lost in a foreign country seems short of a map. What it is actually short of is the true time, to the nearest billionth of a second. It cannot look that up, so it deduces it from four bubbles that refuse to agree until it does.


