Trilateration: finding a place from distances alone
· 7 min de leitura
Este guia ainda não está disponível no teu idioma — aqui fica a versão em inglês.
If all you know is that a city is 251 km from Prague, it could be anywhere on a circle around Prague. Add a second distance and only two points remain; add a third and there is one. That is trilateration, the idea behind every GPS fix, and it still works when the distances are only rough bands of "warm" and "cold".
One distance draws a circle
A single distance is a weak clue. Vienna is 251 km from Prague, but so is Nuremberg, and so is every other point on a circle about 1,580 km long. On the globe that circle is a "small circle": every point on it lies the same distance from Prague along the surface.
On a flat map the circle can look wrong. A Mercator map stretches everything more the closer it gets to the poles, so a large distance circle comes out egg-shaped, swollen on its poleward side. A 1,000 km circle around Prague is drawn about 21% taller north of the city than south of it. The distance is the same in both directions; only the drawing differs.
Two distances leave two points, three leave one
Now add a second clue. Two circles with different centres usually cross at exactly two points. They can also just touch, or miss each other entirely, but if both distances are true, the place you want sits on one of the crossings. A third circle settles which one.
A worked example, with every distance measured along the Earth's surface:
- The hidden city is 764 km from Rome.
- It is 251 km from Prague. The Rome and Prague circles cross at two points: Vienna, and a spot in Bavaria about 15 km from Ingolstadt, some 70 km north of Munich.
- It is 214 km from Budapest. Vienna is 214 km from Budapest; the Bavarian point is 567 km away. Only Vienna is left.
This is often called triangulation, but strictly speaking it is not. Triangulation works from angles, the way surveyors once mapped whole countries with theodolites. Trilateration uses only distances.
Real measurements are never perfect, so in practice the three circles do not meet in one sharp point. They enclose a small triangle, and the best answer is the point that disagrees least with all of them. Every extra measurement helps shrink that triangle.
How GPS does it
Satellite navigation is trilateration from orbit. GPS satellites circle about 20,200 km above the Earth, carrying atomic clocks. Each one keeps broadcasting a signal that says, in effect, "this is satellite number so-and-so, this is where I am, and this is the exact time I sent this message".
Your phone notes when each signal arrives. Radio waves travel at the speed of light, 299,792 km per second, so the delay gives a distance. From a satellite straight overhead the signal needs about 0.067 seconds; from one near the horizon, roughly 25,800 km away, about 0.086 seconds.
In three dimensions, one distance puts you on a sphere around the satellite. Two spheres meet in a circle, and a third sphere cuts that circle in two points. One of them is usually far out in space and can be thrown away. So why do receivers need a fourth satellite?
Because the phone's clock is not an atomic clock. An error of one microsecond, a millionth of a second, shifts every distance by about 300 m. Instead of trusting its own clock, the receiver treats the clock error as a fourth unknown next to the three position coordinates, and four unknowns need four measurements. With more satellites in view, which is normal today, the fix gets better, especially when they are spread across the sky rather than bunched together. Galileo, GLONASS and BeiDou use the same principle, and many phones combine them.
The timing has to be astonishingly precise. Relativity makes the satellite clocks run about 38 microseconds a day fast compared with clocks on the ground, and the system corrects for it. Left uncorrected, the drift would add up to about 11 km of error per day.
When distances come in bands: rings
Now make the clues fuzzy. Instead of "764 km", you only hear "somewhere between 400 and 1,000 km". The circle becomes a ring, a band between two circles, and the hidden place can be anywhere inside it. Rings are big: the 400–1,000 km ring around a city covers about 2.6 million km², and even the narrow 50–150 km ring covers about 63,000 km².
The reasoning stays the same. Two rings overlap in one or two patches rather than two points, and each new ring trims what is left.
Back to the example, with bands instead of exact numbers. Suppose the clues are: 400–1,000 km from Rome, 150–400 km from Prague, 150–400 km from Budapest and 50–150 km from Graz. Here is how eight plausible cities fare, with each distance computed along the surface:
| Candidate | Rome 400–1,000 | Prague 150–400 | Budapest 150–400 | Graz 50–150 |
|---|---|---|---|---|
| Vienna | 764 ✓ | 251 ✓ | 214 ✓ | 145 ✓ |
| Bratislava | 783 ✓ | 289 ✓ | 161 ✓ | 173 ✗ |
| Brno | 871 ✓ | 184 ✓ | 261 ✓ | 252 ✗ |
| Munich | 697 ✓ | 300 ✓ | 561 ✗ | 312 ✗ |
| Salzburg | 658 ✓ | 271 ✓ | 450 ✗ | 197 ✗ |
| Innsbruck | 603 ✓ | 383 ✓ | 575 ✗ | 306 ✗ |
| Zagreb | 517 ✓ | 487 ✗ | 299 ✓ | 146 ✓ |
| Ljubljana | 489 ✓ | 447 ✗ | 381 ✓ | 133 ✓ |
The table carries most of what there is to learn about rings:
- A wide, distant ring cuts little. Rome's 400–1,000 km band keeps all eight candidates.
- Rings from different sides cut most. Prague, to the north-west, removes Zagreb and Ljubljana; Budapest, to the east, removes Munich, Salzburg and Innsbruck. Rings that cross at a wide angle overlap in a small patch, the same reason GPS prefers satellites spread across the sky.
- Close, narrow rings finish the job. Only the 50–150 km ring from Graz separates Vienna from Bratislava and Brno.
- Edges are sharp. Bratislava is 173 km from Graz. Missing the band by 23 km is still missing it.
Thinking in rings
Trilateration is less a formula than a habit. A distance on its own is a circle, two distances are a choice, and three are an answer. With fuzzy clues the answers are patches instead of points, but the patches still shrink, and they shrink fastest when each new clue comes from a direction you have not tried yet. Surveyors, GPS engineers and good players all ask the same question: where should the next measurement come from to cut the remaining area the most?