Understanding the triangulation calculator — concept and principle
This calculator locates a target from two observation points a known distance apart, using the angle each observer measures between the baseline and the line of sight. It gives the distances from both observers, the perpendicular distance from the baseline (for example an aircraft's height), the angle at the target, where the perpendicular meets the baseline and the triangle's area. Use it for surveying exercises, navigation, radar and trigonometry homework.
How it is calculated
With baseline b and angles α (at A) and β (at B):
- Angle at the target γ = 180° − α − β.
- Law of sines: AT = b·sin β ÷ sin γ; BT = b·sin α ÷ sin γ.
- Perpendicular distance d = AT·sin α = b·sin α·sin β ÷ sin(α + β).
- Foot of the perpendicular from A = AT·cos α.
- Area = ½·b·d.
Both angles are measured on the same side of the baseline.
The principle
A triangle is fixed by one side and the two angles next to it (ASA). The angles of a triangle add to 180°, which gives the third angle. The law of sines says each side is proportional to the sine of the opposite angle, so knowing b and its opposite angle γ lets you scale to the other sides. This idea, measuring angles instead of long distances, was the basis of national surveys for centuries and is still used in navigation and positioning.
Worked example
Default inputs: b = 20 (for example miles), α = 15°, β = 35°.
- γ = 180° − 15° − 35° = 130°.
- AT = 20 × sin 35° ÷ sin 130° ≈ 20 × 0.5736 ÷ 0.7660 ≈ 14.975.
- BT = 20 × sin 15° ÷ sin 130° ≈ 6.75729.
- Perpendicular distance d = 14.975 × sin 15° ≈ 3.87582.
- Foot from A = 14.975 × cos 15° ≈ 14.4648; area = ½ × 20 × 3.87582 ≈ 38.7582.
| Baseline length between observers A and B | Distance from the baseline to the target |
|---|---|
| 5 | 0.968955 |
| 10 | 1.93791 |
| 15 | 2.90686 |
| 20 | 3.87582 |
| 25 | 4.84477 |
| 30 | 5.81373 |
| 40 | 7.75164 |
How to read the result
All lengths are in the unit of the baseline. In the radar example, the aircraft is about 15 miles from the first station and about 3.9 miles high. When the angle at the target is very small (the two sight lines are almost parallel), small angle errors cause large distance errors, so a longer baseline gives more reliable results.
Common mistakes
- Measuring one angle from the other end of the baseline or on the opposite side.
- Entering angles whose sum is 180° or more, which leaves no triangle.
- Mixing up the angle at A with the angle at B, which swaps AT and BT.
- Setting the calculator to radians when angles are in degrees.
Frequently asked questions
What is the difference between triangulation and trilateration?
Triangulation uses measured angles; trilateration uses measured distances, as in GPS.
Why use the law of sines here?
You know one side and all three angles, which is exactly what the law of sines needs.
How can I reduce the error?
Use a longer baseline and aim for an angle at the target that is not too small.
Sources: OpenStax, Precalculus 2e (2021), §8.1 Non-right Triangles: Law of Sines