# Triangulation by computer

I was recently presented with over 100 bearings on a radio-tracked target from a pair of known locations. Whilst drawing 100+ pairs of lines on a map and finding their intersects seemed like good fun, I decided to figure out how to do this by computer.

Methods of triangulation are diuscussed under triangulate and not included here. This page merely shows how this can be acheived on a PC in excel

So we have 2 locations with known grid coordinates, A and B, and we wish to determine a third point Z. We know the bearings of Z from A and B are α and β:

```

N

^
|
B
_________|
|         /β
A             |        /
|α____________|       /
\            |      /
\          |     /
\        |    /
\      |   /
\    |  /
\  | /
\|/
Z

```

So using the formula of a line (y=mx+C) we can work out the formulas of the lines from A target Z:

Y = mAx + CA

Where:

mA = 1/tan(α) (the slope of the line)

CA = XA – 1/tan(α) (difference between x and y at the known point A)

Likewise we can work out the formula for the line from B to Z

Y = mBx + CB

Where:

MB = 1/tan(β) (the slope of the line)

CB = XB – 1/tan(β) (difference between x and y at the known point B)

We then solve these two simultaneous equations for the point at which they have the same x and y values (the intersect at point Z):

mAXZ + CA = mBXZ + CB

XZ (mA – mB) = CB – CA

XZ = CB – CA
------------
mA - mB

And then use the formula of either of the lines to get y:

YZ = mAXZ + CA

In excel this is represented by the following. Note that excel uses radians, so we need to convert the bearings to radians if they are in degrees.

```
|A       |B   |C                      |D      |
--|--------|----|-----------------------|-------|
1|Site A  |XA  |                       |  1    |
2|        |YA  |                       |  5    |
3|Bearing |α   |                       |312.27 |
4|Site B  |XB  |                       |  9    |
5|        |YB  |                       |  7    |
6|Bearing |β   |                       | 19.65 |
11|Site Z  |XZ  |=(C10-C8)/(C7-C9)      |  6.500|
12|        |YZ  |=C7*C11+C8             |  0.000|
```

You should note that if the original bearings were incorrect and did not actually intersect (i.e. were diverging), then the formula above will give an intersect point behind the observer. You’ll need to check that the resulting point lies in the correct direction (not 180 degrees out) from both observers if you are uncertain of the correctness of your data.

Log in or register to write something here or to contact authors.