2D Triangulation

This is how to calculate 2D Triangulation using Mathematics

We assume that you are at an unknown position P where you can see two flagpoles A and B , both of whose position is well known.

We can do this by the intersection of two lines. The first line is from P to Flagpole A called "first line". The second line if from P to Flagpole B called "second line". Using the equation of a line and Matrix operations, we can find the unknown position value of P which consists of X and Y

Next we need to find the Numeric values for the Constants M1,M2 and C1,C2

We can do this with the Azimuth value θ which is the bearing (From North to the target F, (F for Flagpole) , see diagram below).

We have

M1 = Cot(θ1)

C1 = Y - Cot(θ1) X Using the X,Y value of Flagpole A

and

M2 = Cot(θ2)

C2 = Y - Cot(θ2) X Using the X,Y value of Flagpole B

Next of course is to substitute {M1,M2,C1,C2} into the equation below

X = (C1-C2)/(M2-M1)

Next of course is to substitute {M1,M2,C1,C2} into the equation below

Y = (M2*C1 - M1*C2)/(M2-M1)

So finally we have our solution below

where xA is the X value of Flagpole A

yA is the Y value of Flagpole A

θA is the Azimuth or Bearing of Flagpole A

ans similarly for xB, yB, θB for Flagpole B

Note that θA = θ1 and θB = θ2