Four Clocks in the Sky

by Nerd Notes Updated 0 views

Open a map on your phone, and a blue dot lands on the street where you stand. The dot comes from satellites about 20,000 km overhead. Yet your phone has never sent those satellites a single message, and the satellites have no idea your phone exists.

GPS satellites only talk. Each satellite broadcasts two things, over and over: the time on its clock, and where the satellite is in its orbit. From nothing but those broadcasts, your phone works out where you are, often to within about 5 metres under open sky.

An animation of three GPS satellites sending signals down to a phone on the ground. Rings of signal spread down from each satellite and reach the phone, and nothing travels back up. The animation plays by itself, in a loop. It pauses for a moment when the last ring reaches the phone.

Text version

Three satellites sit high above a curved strip of ground, and a phone stands on the ground below them. All three satellites send out a signal at the same moment, drawn as rings that spread downward. The ring from the satellite straight overhead reaches the phone first, because that satellite is the closest, and the rings from the two satellites off to the side arrive a moment later. The phone lights up as each ring arrives. The phone never sends anything back: the signals only travel down.

Make your guess. How does your phone turn those broadcasts into a position?

  1. The satellites spot the phone and radio back its position
  2. The phone times how long each signal took to arrive
  3. The phone measures how strong each signal is
Show answer

B. The phone times how long each signal took to arrive

The phone times the signals. A signal that took longer to arrive came from farther away, and a few distances pin down one spot. Signal strength is far too unreliable: a wall or a pocket weakens a signal without moving you an inch.

The whole trick starts with something you may already do in a thunderstorm.

Distance from a delay

You see lightning, and a few seconds later you hear the thunder. Sound covers about 1 km every 3 seconds, so counting the seconds tells you how far away the lightning struck.

An animation of two races against two timers. A thunder front crosses 1 km in about 3 seconds, and a satellite's radio signal crosses 20,200 km in about 0.067 seconds. The animation plays by itself, in a loop. The radio signal crosses in a blink, so press Slow motion to replay the race with its first fraction of a second slowed down; the thunder then carries on at normal speed. Press the button again to return to normal speed.

Text version

The top lane shows thunder. A lightning bolt flashes on the left, and a sound front spreads to the right toward a listener 1 km away while a timer counts up. The bottom lane shows a GPS satellite on the left and a phone 20,200 km away on the right, with its own timer. Both timers start together. The radio front reaches the phone almost at once, and its timer stops at 0.067 seconds, while the thunder front has barely left the lightning. The thunder front then crawls across its lane, and its timer stops at 3.0 seconds when the sound reaches the listener.

GPS plays the same trick with radio waves, which travel at the speed of light: about 300,000 km every second. Each satellite stamps the time onto its signal. Your phone notes when the signal arrives, and the gap between the two times is the travel time. Travel time × speed of light = distance.

A GPS satellite sits about 20,200 km straight above you. How long does its signal take to reach you?

  1. About 7 seconds
  2. About 0.07 seconds
  3. No time at all: radio is instant
Show answer

B. About 0.07 seconds

20,200 km ÷ 300,000 km per second ≈ 0.067 s. Fast, but not instant, so the phone can measure the delay. A satellite low on the horizon is farther away, so its signal takes a little longer.

So one satellite gives your phone one distance. But a distance has no direction. Where could you be?

Circles that meet

Every spot exactly 2 km from a satellite lies on a circle around that satellite. So one distance puts you somewhere on a circle. A second satellite draws a second circle, and you must be where the two circles cross.

To keep the picture flat, this map pretends the satellites sit at its edges, a few kilometres away.

Your goal: drag yourself anywhere on the map. Then switch between 1, 2 and 3 satellites, and count the spots that fit every circle.

Find yourself

One satellite leaves a whole ring of spots, and two satellites leave two spots. The third circle passes through only one of those two spots, and that spot is you. Finding a position from distances like this is called trilateration.

The real world isn't flat, so each distance draws a sphere around its satellite instead of a circle. The idea stays the same. But every circle on the map relied on one thing: perfect timing. How good is the clock in your phone?

The clock problem

Your phone's clock is off by one millionth of a second, called a microsecond (µs). How far off is each distance?

  1. About 30 cm
  2. About 300 m
  3. About 30 km
Show answer

B. About 300 m

Light covers about 300 m in a microsecond. So a clock that is off by just 1 µs makes every distance about 300 m wrong.

Each GPS satellite carries atomic clocks, and ground stations keep the satellite clocks in step to within a few billionths of a second. Your phone has a quartz clock, like a watch, which can drift by a microsecond within a second or two.

Your goal: slide the phone's clock from "right" to 1 µs ahead, and watch the three circles.

A wrong clock

Every circle grows by the same 300 m. The circles stop meeting, and your dot lands hundreds of metres from where you stand. A phone can't carry an atomic clock. So how does a phone with a cheap clock still find you to within a few metres?

Why four satellites

Look again at what the wrong clock did. Every circle was off by the same amount, because the phone timed every signal with the same clock. So the phone doesn't need a better clock. The phone needs the one shift that makes all the circles meet again.

Your goal: your phone's clock is off by an unknown amount. Slide the clock fix until the three circles meet at one point. Then hide satellite C and slide again.

Be the phone

With three circles, only one clock fix makes the circles meet, so the meeting point gives your position and the true time together. With only two circles, a whole range of settings makes the circles cross, so the phone could never tell which setting is right. The extra satellite catches the clock error.

On the flat map, the phone had three unknowns. The real world adds one more:

WhereWhat the phone must findSatellites needed
Flat mapeast, north, clock error3
Real worldeast, north, height, clock error4

That's why GPS needs four satellites. A phone usually hears many more, often from other countries' systems too, and uses every signal to sharpen the fix.

How the phone really solves it (the math)
  1. One distance per satellite. Satellite \(i\) sends its signal at time \(t_i\), and the phone receives the signal at time \(t_r\) on the phone's own clock. With \(c\) for the speed of light, the measured distance is

\[ \rho_i = c\,(t_r - t_i) \]Engineers call \(\rho_i\) a pseudorange: "pseudo" because the phone's clock is off.2. The clock error adds the same amount to every distance. If the phone's clock is ahead by \(b\) seconds, every distance is too long by \(c\,b\):
\[ \rho_i = \sqrt{(x-x_i)^2 + (y-y_i)^2 + (z-z_i)^2} + c\,b \]Each satellite broadcasts where it was, \((x_i, y_i, z_i)\). The phone's position \((x, y, z)\) and the clock error \(b\) are unknown.

  1. Count the unknowns. \(x\), \(y\), \(z\) and \(b\) make four unknowns, so four satellites give just enough equations.
  2. Guess and improve. The square roots make the equations hard to solve in one step. The phone starts from a guess (the last fix, or even the centre of the Earth), works out how wrong each equation is, nudges \(x, y, z, b\) to shrink the errors, and repeats. A few rounds are usually enough.
  3. More satellites than unknowns. With 8 or 10 satellites in view, the equations can't all be exactly right, because every measurement carries a little noise. The phone picks the \(x, y, z, b\) that make the errors smallest overall, called a least-squares fit.

So the satellites fix your phone's clock. Now everything rests on the satellite clocks. Does a clock in orbit tick at the same rate as a clock on the ground?

Einstein in orbit

No. Einstein showed that clocks don't all tick at the same rate, and two of his effects change a GPS clock in opposite directions.

Gravity slows time. A clock deep in Earth's gravity ticks a little slower than a clock high above. The satellites orbit 20,200 km up, so their clocks run fast compared with yours. This effect comes from general relativity.

Speed slows time. A moving clock ticks slower, and each satellite moves at about 3.9 km every second. This effect comes from special relativity.

Drawing
One day in orbit compared with one day on the ground, in microseconds.

Left alone, a satellite clock would gain about 38 µs a day. How far does light travel in 38 µs?

  1. About 11 m
  2. About 11 km
  3. About 11,000 km
Show answer

B. About 11 km

38 µs × 300 m per µs ≈ 11,400 m, or about 11 km. That's where the famous claim comes from: without relativity, GPS would drift by about 10 km a day.

Engineers build the correction into the hardware. Before launch, each satellite clock is set to tick very slightly slow, so that in orbit the clock keeps pace with clocks on the ground. Every time your blue dot lands on the right street, both of Einstein's theories pass a test.

Where 45 and 7 come from (the derivation)
  1. Gravity. A clock at distance \(r\) from Earth's centre runs fast, compared with a clock on the ground at radius \(R\), by the fraction

\[ \frac{GM}{c^2}\left(\frac{1}{R} - \frac{1}{r}\right) \]With \(GM = 3.986\times10^{14}\ \text{m}^3/\text{s}^2\), \(R = 6{,}371\text{ km}\) and \(r \approx 26{,}560\text{ km}\) (Earth's radius plus the 20,200 km height), the fraction is about \(5.3\times10^{-10}\). A day lasts 86,400 s, so the satellite clock gains about \(45.7\ \mu\text{s}\) a day.

  1. Speed. The orbit speed is \(v = \sqrt{GM/r} \approx 3.87\text{ km/s}\). A moving clock runs slow by the fraction \(v^2/2c^2 \approx 8.3\times10^{-11}\), which costs about \(7.2\ \mu\text{s}\) a day.
  2. Together. \(45.7 - 7.2 \approx 38.5\ \mu\text{s}\) a day. Light covers about 11.5 km in that time.
  3. The correction. The satellite clocks are built around a rate of 10.23 MHz (10.23 million ticks a second). Before launch, each clock is set to 10.22999999543 MHz, slow by about 4.5 parts in 10 billion, which cancels the gain.
  4. A fair caveat. "10 km a day" is a back-of-the-envelope figure. An error shared by every satellite clock would partly vanish into the phone's own clock fix, as in the game above. But the broadcast times and orbits would drift away from ground time by 38 µs a day, which the system could not live with. Smaller effects matter too: the orbits are slightly oval, so receivers apply one more small relativity correction.

Using satellites to find yourself sounds like a modern idea. Who thought of it first?

From Sputnik to your pocket

In October 1957, the Soviet Union launched Sputnik, the first artificial satellite. At the Johns Hopkins Applied Physics Laboratory, two young physicists, William Guier and George Weiffenbach, listened to Sputnik's radio beeps. The pitch of the beeps shifted as Sputnik flew past, and from that shift the two physicists worked out Sputnik's orbit.

Their boss, Frank McClure, flipped the question: if you already know where a satellite is, can you work out where you are? The answer became Transit, the satellite system the US Navy used to guide ships and submarines from the 1960s. The first GPS satellite launched in 1978, and GPS was declared fully working in 1995.

GPS was built for the military. In 1983, a Korean airliner strayed into Soviet airspace and was shot down, and President Reagan then announced that GPS would be open to civilian use. Until 2000, the civilian signal was also blurred on purpose. Switching the blur off in May 2000 made civilian fixes roughly ten times sharper.

Real Engineering tells this story, and the physics behind it, in a video:

Play video · YouTube
"Why The US Military Made GPS Free-To-Use" by Real Engineering, on YouTube.

Today GPS sits in billions of pockets. Where does GPS show up in your day, and where does GPS struggle?

Where it shows up

  • The time on your phone. A GPS fix also gives the exact time, so many phone networks, power grids and banks keep time with GPS.
  • The dot that jumps between tall buildings. A signal that bounces off a wall takes a longer path, so that satellite's circle comes out too big.
  • A fast first fix. Satellites send their orbit details slowly, at 50 bits per second. Phones download the same details over the internet instead, called assisted GPS.
  • Finding you indoors. Satellite signals are faint indoors, so phones also look up nearby Wi-Fi networks and cell towers in a large map of where each one sits.
  • More than one system. GPS is the US system. Most recent phones also hear Europe's Galileo, Russia's GLONASS or China's BeiDou.

An animation of a GPS signal in a street between two tall buildings. The nearer building blocks the straight path to the phone, so the signal that reaches the phone has bounced off the far building's wall and arrives late. The animation plays by itself, in a loop. It pauses when the bounced signal reaches the phone and shows two arcs: the true distance and the longer distance that the phone measures.

Text version

A satellite sits high on the left. A short building stands in the middle of the street, a tall building stands on the right, and a phone stands on the ground between them. The satellite sends a wave that spreads out in circles. The straight path to the phone runs into the short building and stops there, marked with a cross. Part of the wave passes over the short building, hits the wall of the tall building and bounces back down to the phone. When the bounced signal arrives, two arcs centred on the satellite appear: a dashed arc through the phone shows the true distance, and a solid arc farther out, inside the tall building, shows the longer distance the phone measured. Because the bounced path is longer, the phone draws that satellite's circle too big.

The blue dot, explained

Now you can explain the blue dot. Satellites broadcast the time, and your phone turns each delay into a distance. Each distance draws a circle, and the circles meet at one spot.

A cheap phone clock throws every circle off by the same amount, so one extra satellite catches the clock error: four satellites for four unknowns. And the satellite clocks are set to run slow before launch, so Einstein's two effects cancel out in orbit.

When the dot jumps between tall buildings, you know why too: a bounced signal took the long way round.

Where to go next

GPS is a doorway to a lot of other ideas. Here are the questions this page opens up:

  • How does my phone find me indoors, where satellite signals barely reach?
  • Why does gravity make time run slower?
  • How does a map app turn my dot into the fastest route?
  • How can a phone hear a satellite signal that is fainter than the background noise?
  • Could someone fake GPS signals, and how would my phone notice?

Ask Phy

  • Walk me through how my phone finds its position from four satellites, one equation at a time.
  • Why does a clock high above Earth tick faster? Explain the idea before the equations.
  • How does Wi-Fi positioning work, and how accurate is it compared with GPS?