display | more...

# 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 |