# Triangulation algorithm for mobile geolocation detection

Please help with algorithm for getting radius (L) and center decimal coordinates (X) of blue circle.

Drawing here

Following points are given:

c1 = 56.963022,24.640274 r1 = 6km
c2 = 56.878324,24.490585 r2 = 5km
c3 = 56.870819,24.746017 r3 = 8km

Answer should be in following format:
X = XX.XXXXXX;
L = X.XX km

PS. I need this for creating software for my Master's work and I am a web programmer, not mathematician, so please try not to use very scientific language :)

Thanks!

-

For small distances like this, you can consider the earth to be flat. We will use $R$ for the radius of the earth, $\lambda$ for latitude and $\phi$ for longitude. If you pick one of the points to be the origin, the distance in $y$ (north/south) is $R (\lambda_2-\lambda_1)\frac \pi{180}$ and the distance in $x$ (east/west) is $R \cos \lambda (\phi_2-\phi_1)\frac \pi{180}$, where the $\frac \pi{180}$ factor comes because your angles are degrees. Then you can use the formlae in mathworld to find the points where the circles intersect. The center of your blue circle is the centroid of the triangle.