How GPS knows where you are
Tonight's idea
A GPS satellite does one thing: it broadcasts the time and its own position, over and over. Your phone compares the broadcast time with its own clock. The delay, multiplied by the speed of light \(c = 299{,}792.458\) km/s, is the distance to the satellite. From 20,200 km up, the signal takes about 67 milliseconds.
Knowing you are 20,176 km from one satellite puts you on a sphere of that radius centred on it. Two spheres meet in a circle; a third cuts that circle in two points, one of which is out in space and thrown away. Three distances, one position: trilateration (not triangulation, which uses angles).
The catch is the clock. The satellites carry atomic clocks; your phone does not, so every delay it measures is off by the same unknown amount. What it computes is a pseudorange: measured range = geometric distance + \(e\), one signed \(e\) shared by all the satellites (a microsecond of clock error makes \(e\) about 0.3 km). So treat \(e\) as a fourth unknown alongside \(x, y, z\) and use a fourth satellite: four equations, four unknowns. Every GPS fix is also a clock synchronised to the atomic standard.
Relativity matters here too. The satellites move at 3.87 km/s and sit higher in Earth's gravity, and each changes how fast their clocks tick, per day (so they are built to tick slightly slow before launch):
| motion (special relativity) | −7 µs, slow |
| weaker gravity (general relativity) | +46 µs, fast |
| net | +38 µs ≈ 11 km of range |
Watch one: trilateration in two dimensions
Three radio towers at \(A = (0, 0)\), \(B = (8, 0)\) and \(C = (0, 6)\), in km. Your phone's distance to each is exactly 5. The circles are \(x^2 + y^2 = 25\), \((x - 8)^2 + y^2 = 25\) and \(x^2 + (y - 6)^2 = 25\). Subtract the first from the second: \(-16x + 64 = 0\), so \(x = 4\), which with circle \(A\) alone allows \((4, 3)\) or \((4, -3)\). Subtract the first from the third: \(-12y + 36 = 0\), so \(y = 3\): the third circle picks \((4, 3)\). Subtracting cancelled the \(x^2\) and \(y^2\) terms and left linear equations. Now the clock. Suppose the phone reads 6, 6 and 6 (dashed): each is the true distance plus the same unknown \(e\), so the true distances are \(6 - e\). The subtractions still cancel the squares, so \(x = 4\), \(y = 3\) again, and \(4^2 + 3^2 = (6 - e)^2\) forces \(6 - e = 5\), \(e = 1\): every dashed circle shrinks by the same 1 km onto its solid one.
Your turn
- (a) A signal arrives 67.3 ms after it was sent. How far away is the satellite? (b) If your clock is off by 1 microsecond, how wrong is that range? By 1 nanosecond? (c) What timing accuracy gives 3 m range accuracy?
- Towers at \(A = (0, 0)\), \(B = (10, 0)\), \(C = (0, 10)\); your distances to them are \(5\), \(\sqrt{65} \approx 8.06\) and \(\sqrt{45} \approx 6.71\). Find your position by the subtraction trick. With only towers \(A\) and \(B\), what two positions would be possible?
- The clock problem. Back to the figure's towers \(A = (0, 0)\), \(B = (8, 0)\), \(C = (0, 6)\). Each measured range is the geometric distance plus the same unknown \(e\), possibly negative; you measure 4, 4 and 4. Find \(x\), \(y\) and \(e\), then explain why three dimensions need four satellites rather than three.
- Satellite clocks gain 38.5 microseconds a day. Convert that to a range error per day, and per hour. After how many minutes has an uncorrected clock drifted by 1 microsecond?
Stretch: where the 7 microseconds comes from
A clock moving at speed \(v\) ticks slower by the factor \(\sqrt{1 - v^2/c^2}\) (special relativity's time-dilation factor, on trust tonight). For small \(x\), \(\sqrt{1 - x} \approx 1 - x/2\) (check by squaring), so the fractional slowing is about \(v^2/(2c^2)\). Put in \(v = 3.874\) km/s and \(c = 299{,}792\) km/s, multiply by the 86,400 s in a day, and see whether you get 7 microseconds.
Answers
- (a) \(0.0673 \times 299{,}792 \approx 20{,}176\) km. (b) One microsecond: \(0.30\) km (300 m). One nanosecond: 30 cm. (c) For 3 m of range you need the time right to \(3 / (3 \times 10^8) = 10\) nanoseconds. (The position error is bigger and depends on how the satellites are spread across the sky.)
- Circles \(x^2 + y^2 = 25\), \((x-10)^2 + y^2 = 65\), \(x^2 + (y-10)^2 = 45\). Second minus first: \(-20x + 100 = 40\), \(x = 3\). Third minus first: \(-20y + 100 = 20\), \(y = 4\). Position \((3, 4)\); check \(9 + 16 = 25\). With only \(A\) and \(B\): \(x = 3\) and \(y^2 = 16\), so \((3, 4)\) or \((3, -4)\). The third circle picks one.
- Geometric distance is \(4 - e\) to each tower. The subtractions are unchanged (the \((4-e)^2\) cancels), so \(x = 4\), \(y = 3\) as in the figure, and then \(4^2 + 3^2 = (4 - e)^2\) gives \(4 - e = 5\), \(e = -1\): this time the ranges were 1 km too short. (The other root, \(e = 9\), would make the distances negative.) Three towers fixed three unknowns \((x, y, e)\). In three dimensions the unknowns are \((x, y, z, e)\), four of them, so four satellites are needed.
- \(38.5 \times 10^{-6} \times 299{,}792 \approx 11.5\) km per day, about 480 m per hour. \(1/38.5\) of a day is about 37 minutes.
Stretch. \((1 - x/2)^2 = 1 - x + x^2/4 \approx 1 - x\) for small \(x\). \(v^2/(2c^2) = (3.874/299{,}792)^2/2 \approx 8.35 \times 10^{-11}\); times 86,400 s gives \(7.2 \times 10^{-6}\) s, about 7 microseconds slow per day. The gravitational 46 microseconds needs general relativity, and wins; a satellite in a very low orbit moves faster and sits barely higher, so there the velocity term wins and the clock runs slow overall. Astronauts on the space station age very slightly less than we do; GPS satellites age very slightly more.