[GIS] Possible to get Lat/Lon coordinates of triangle vertex point

coordinateslatitude longitudepointvertices

I have two known points (A and B) on latitude / longitude coordinates.
Certainly I know the distance between A and B in meters.

I have third point C with unknown coordinates, but I know the distance between AC and BC in meters.

Is it possible to get the lat/lon coordinates of point C with math formula?


Here is an example:

The all known distances between coordinate points are:

AB = 120.9234 meters
AC = 226.7206 meters
BC = 213.1376 meters

The known coordinates of A and B point:

A lat = 47.49784;
A lon = 19.08939;

B lat = 47.49893;
B lon = 19.08941;

and I calculated all angles of triangle in deg:
B: 80.341932306607
A: 31.722055823679
C: 67.936011869714

and I measured the result what I looking for in map:
Lat: 47.498575374822
Lon: 19.09129858017

but I like to use a math formula to get these two coordinates of point C using the upper input values.

Best Answer

Assuming you know AB, AC, and BC, then the answer is yes. It requires trigonometry. The following assumes a flat plane and that points A anb B are not on the same line of latitude or longitude. To get the lat/long of C you need to figure out the ΔX and ΔY from a known point (let's use A).

You're going to need the value of the angle θ, which is 90-a-λ

Let ΔXB and ΔYB be the lat/long difference from A to B (both of which have known coordinates). From basic trigonometry we know that sin(λ) = ΔYB/AB. Therefore λ = arcsin(ΔYB/AB).

By the Law of Cosines cos(a) = (AB²+AC²-BC²)/(2*AB*AC), which means a = arccos((AB²+AC²-BC²)/(2×AB×AC))

Therefore θ = 90 - arccos((AB²+AC²-BC²)/(2×AB×AC)) - arcsin(ΔYB/AB)

With θ calculated, we're back to basic trigonometry again: sin(θ)= ΔX/AC and cos(θ) = ΔY/AC. Therefore ΔX = sin(θ)×AC and ΔY = cos(θ)×AC. Just add those values to the coordinates of A, and you have your answer.

enter image description here

TLDR version:

  • C(x) = A(x) + AC × sin(90 - arccos((AB²+AC²-BC²)/(2×AB×AC)) - arcsin((A(y)-B(y))/AB))
  • C(y) = A(y) + AC × cos(90 - arccos((AB²+AC²-BC²)/(2×AB×AC)) - arcsin((A(y)-B(y))/AB))