Estimate the location or area of a distant feature by providing two observation locations and feature directions.

Already know what you're doing? Jump to the tool!

Want to learn more about triangulation?

**The situation.** You and a friend are both on separate little hills surrounded by forests. Your friend is at some distance from you but able to communicate by radio.
You both see your expected supplies be air-dropped into the forest.
As this is a forested region and the supply-drop will be hidden once in lands in the forest. It will **not** be possible to view the location again.
Simply walking towards where you think it may be is a bad idea. You're likely to underestimate its distance as well as lose your orientation (the direction of the objective).

Luckily both of you have good compasses and the same grid map.
By using both your observations you can **triangulate** the location of the objective on the map.
**Triangulation allows you the determining the location of a third point by using the known location of two points and their respective directions to the third.**

It is also possible to determine your location on a map by getting the compass bearings of two known points relative to the observer. This isn't covered here but should be fairly straight-forward to determine.

**To perform triangulation** you need to know two points of information at two separate locations, as shown in the adjacent figure:

- Observer location (orange boxes), and
- the compass bearing (direction - shown in grey) of the desired feature from that location.

**To determine observer location:** Using a map, in this case with grid cells, note the location (e.g., C1, E5) of each observer.

**To determine feature directions:** For each observer indicate the compass direction of the objective (e.g., North is 0, East 90, South 180, West 270).

On a grid map you could simply draw in this information as shown in the figure. Using the Rusttrian tool just enter the information and click **Triangulate** to calculate an estimated area of where the observed feature is located.

**Improving the accuracy.** The large size of the area the feature is estimated to be located within, shown in green in the figure above, is due to observations locations being identified as rather large areas (the whole grid cell) rather than points. You can provide your location more accurately using the precision options that appear after submitting the first four parameters (as shown to the left).

**The results.** The estimation area is now much smaller than before thanks to the added accuracy of observation locations.

Note that for this improved accuracy method a small uncertainty is added to the compass directions to provide an area rather than a single point. Poor compass readings means that the feature may be located outside the resulting estimation area.

Now try it for yourself!

Provide the grid coordinate locations and headings from two perspectives.

Identify the location of each observer within the grids to increase precision and reduce the triangulation area below.

Submit inputs above to see resulting map.

Given two locations, with coordinates and headings (compass directions in degrees), how can you triangulate a point?

Let us define the two locations *L _{1}* and

- L
_{1}: x_{1}, y_{1} - L
_{2}: x_{2}, y_{2}

At each location the following compass heading readings are taken:

- L
_{1}: h_{1} - L
_{2}: h_{2}

To triangulate a location we must convert these locations and compass headings into linear equations.

We must convert and reorder the above components to create the equations for each line. A line (in slope intercept form) takes the form * y = mx + b* where:

**m**is the slope, the angle or steepness of the line**b**is the y intercept, where the line touches the vertical y-axis when x=0

Before converting a compass reading to a slope, let's be clear about what is meant by slope.

Slopes can now be calculating by simply getting the inverse of the tangent:

**1/tan(heading)**

*Equation 1: Calculating slope.*

If your Tangent function (tan) expects radians rather than degrees you can integrate the conversion:

**1/tan(heading/180*π)** where π≈3.1415

*Equation 2: Calculating slope and conversion to radians.*

This can now provide you the slope for each line.

- L
_{1}: m_{1}= 1/tan(h_{1}) - L
_{2}: m_{2}= 1/tan(h_{2})

To create the linear equation the y-intercepts are still missing: b_{1} and b_{2}.

We now know the slope but need to know how to position the line on the map or graph.

Given that we are aiming for a slope intercept form of the linear equation (* y = mx + b*) we can simply reorder the equation by isolating

**b = y - mx**

*Equation 3: Solving for the y-intercepts for both L _{1} and L_{2}.*

As **we know the coordinates (x, y)** and now the slope for each location, we can solve for b.

- L
_{1}: b_{1}= y_{1}- m_{1}x_{1} - L
_{2}: b_{2}= y_{2}- m_{2}x_{2}

Resulting in knowning the slope and intercepts for both lines and linear equations:

- L
_{1}: y = m_{1}x + b_{1} - L
_{2}: y = m_{2}x + b_{2}

Now that both linear equations are known, **it is time to solve for where they intercept**.

Given two linear equations it is possible to solve their intercept.

Where the two lines intercept they have the same x and y values. We can solve for x_{i}, at the intercept:

**
y _{1} = y_{2},**

m_{1}x_{i} + b_{1} = m_{2}x_{i} + b_{2},

m_{1}x_{i} - m_{2}x_{i} = b_{2} - b_{1},

x_{i}(m_{1} - m_{2}) = b_{2} - b_{1},

x_{i} = (b_{2} - b_{1}) / (m_{1} - m_{2}),

And for the y coordinate intercept, y_{i}, we need only to substitute into either of the linear equations, for example within the first:

**
y _{i} = m_{1}x_{i} + b_{1}**

Equations 4 and 5 allow solving the interception location of both linear equations. In practice however, there's error, making compass readings and calculated intercepts uncertain. The amount of error will depend on a variety of factors, such as compass reading error, compass error (e.g. due to metal nearby), and (unnacounted for) magnetic declination.

A good application of triangulation is not only determining the location of an objective, but also its distance.

Once x_{i} and y_{i} are determined it's a simple process to determine the distance between either location (L_{1}, L_{2}) and the objective using pythagorus' formula.

The distance, d_{1}, between L_{1} and the objective can be determined by solving:

**d _{1}^{2} =
(x_{i} - x_{1})^{2} +
(y_{i} - y_{1})^{2}
**

It should be noted that the above doesn't always function. When lines are parallel, vertical or horizontal, some additional or alternative steps need to be taken.

Further, in some cases, unexpected results can occur if the inputs are wrong either from poor accuracy or data entry. For example, let's say two observers note the location of an objective but their compass readings have too much error, they may get a result showing the triangulated location in the opposite direction than expected. See below.

To create areas of uncertainty rather than points of intersection, Rusttrian simply repeats the above process with readings that are +1 and -1 degrees from every compass heading reading. This creates a multitude of intersection points, particularly for the grid (although the grid does not add error to compass headings as there is already large uncertainty from the grid). The outwards-most points are selected using the Quickhull algorithm.

This process creates intersection areas, or areas of uncertainty, as shown below.