Introduction
A GPS receiver finds where it is from nothing but distances to points whose positions it knows. The geometry behind that is the Pythagorean theorem and the equation of a circle. This reading walks through a flat, two-dimensional version of the problem, finds the receiver's position, and then shows what a clock error of one millionth of a second does to the answer.
The Starting Point
Picture a flat map with a grid on it, measured in kilometers. Each point on the map has two coordinates: how far east of a starting corner it is, written first, and how far north, written second. Three beacons sit at known positions:
| Beacon | Position (km) |
|---|
| A | (0, 0) |
| B | (10, 0) |
| C | (0, 10) |
A receiver somewhere on the map has timed a signal from each beacon and turned each delay into a distance. Signals travel at the speed of light, about 300 meters per microsecond (Ashby 2003). The distances are:
- 5 km to A
- \sqrt{65} km, about 8.06 km, to B
- \sqrt{45} km, about 6.71 km, to C
The question is where the receiver is.
One tool does all the work. The distance between two points on the grid comes from the Pythagorean theorem: the east-west gap and the north-south gap form the two shorter sides of a right triangle, and the distance is the longest side. So a point (x, y) is at distance r from a point (p, q) exactly when
(x - p)^2 + (y - q)^2 = r^2
The set of all points at distance r from (p, q) is a circle of radius r around it, so this is the equation of that circle.
Walking Through the Location Fix
Step 1: Draw a circle around beacon A
The receiver is 5 km from A. That doesn't say which direction, so the receiver could be anywhere on a circle of radius 5 around A. With A at (0, 0), the circle's equation is
x^2 + y^2 = 25
One distance has narrowed the position from anywhere on the map to somewhere on one circle.
Step 2: Add the circle around beacon B
The receiver is also \sqrt{65} km from B, at (10, 0). That puts it on a second circle:
(x - 10)^2 + y^2 = 65
The receiver must lie on both circles, so it is at a point where they cross. To find the crossing points, subtract the first equation from the second. The y^2 terms cancel, and multiplying out (x - 10)^2 = x^2 - 20x + 100 leaves
-20x + 100 = 40
So x = 3. Putting x = 3 into x^2 + y^2 = 25 gives y^2 = 16, so y is 4 or -4. Two candidate points remain: (3, 4) and (3, -4). Two circles usually cross at two points, and two distances alone can't tell which point is right.
Step 3: Add the circle around beacon C
The third distance settles it. The receiver is \sqrt{45} km, about 6.71 km, from C at (0, 10). Check each candidate:
- From (3, 4) to C: the gaps are 3 and 6, so the distance squared is 9 + 36 = 45. That matches.
- From (3, -4) to C: the gaps are 3 and 14, so the distance squared is 9 + 196 = 205. The distance is about 14.3 km, which doesn't match.
Only (3, 4) fits all three distances. That's the receiver's position. This method, finding a position from distances to points whose positions are known, is called trilateration.
Step 4: Check each distance with the Pythagorean theorem
A good habit is to check the answer against every piece of information you started with:
- To A at (0, 0): 3^2 + 4^2 = 9 + 16 = 25, and \sqrt{25} = 5. Correct.
- To B at (10, 0): (3 - 10)^2 + 4^2 = 49 + 16 = 65. Correct.
- To C at (0, 10): 3^2 + (4 - 10)^2 = 9 + 36 = 45. Correct.
All three distances check out, so (3, 4) is the one point that fits.
Step 5: Add a clock error of one microsecond
Now suppose beacon C's clock is off by one microsecond. The receiver turns time into distance at about 300 meters per microsecond, so it now thinks C is about 0.3 km farther away than it really is: about 7.01 km instead of 6.71 km.
The circles around A and B haven't changed, and they still cross at (3, 4). But the circle around C has grown by 0.3 km, and it no longer passes through (3, 4). The circles around A and C now cross near (3.26, 3.79), about a third of a kilometer from the true position. The three circles no longer meet at one point. The receiver can see that something is inconsistent, but it can't tell from the circles alone which beacon is wrong.
Step 6: Scale up to a day of uncorrected drift
GPS satellite clocks, left uncorrected, would run fast by about 38 microseconds a day because of the effects of relativity (Ashby 2002). At 300 meters per microsecond, that's
38 \times 300 = 11{,}400 \text{ meters}
or about 11.4 km of error in each distance after one day. Ashby states that one day's clock errors would cause navigation errors of more than 11 km (Ashby 2002). A one-microsecond error moved the position by a third of a kilometer. A day's drift would make the method useless within hours.
Key Considerations
Three dimensions, four satellites. The flat map simplifies the real problem. In space, each distance puts the receiver on a sphere around a satellite, not a circle. The receiver's own clock is also far less accurate than the satellites' atomic clocks, so it treats its own clock error as a fourth unknown alongside its three coordinates. Four unknowns need four distances, which is why GPS receivers use signals from at least four satellites (Ashby 2003).
Distance comes from time. Every distance in this walkthrough came from a timed signal. That's why the clock error in Step 5 matters so much: a tiny error in time becomes a large error in distance.
The common mistake: thinking GPS sends your location to the satellites. It's natural to assume the satellites track your phone. They don't. Each satellite broadcasts its own position and the time, and the receiver only listens. All the geometry in Steps 1 to 4 happens inside the receiver. The satellites never learn where you are.
Summary
Three distances to three known points pin down one position on a flat map, and the Pythagorean theorem both finds it and checks it. Here is the model result:
| Beacon | Position (km) | Distance to receiver (km) | Check at (3, 4) |
|---|
| A | (0, 0) | 5 | 3^2 + 4^2 = 25 |
| B | (10, 0) | \sqrt{65}, about 8.06 | 7^2 + 4^2 = 65 |
| C | (0, 10) | \sqrt{45}, about 6.71 | 3^2 + 6^2 = 45 |
Position found: (3, 4).
Effect of a 1-microsecond error in C's clock: the distance to C reads about 7.01 km, the three circles no longer meet at one point, and the circles around A and C cross about 0.33 km from the true position. A 38-microsecond daily drift would add about 11.4 km of error.
- The circles around A and B cross at two points, (3, 4) and (3, -4).
- The circle around C rules out (3, -4), which is about 14.3 km from C.
- The check uses the same Pythagorean distance formula that set up the circles.
References
- Ashby, Neil. 2002. "Relativity and the Global Positioning System." Physics Today 55 (5). doi:10.1063/1.1485583.
- Free: None confirmed
- Publisher: Physics Today
- Free companion: Ashby 2003
- Ashby, Neil. 2003. "Relativity in the Global Positioning System." Living Reviews in Relativity 6: 1. doi:10.12942/lrr-2003-1.