I have 2 coordinates (Longitude and Latitude) and a distance from them to a third coordinate. How is it possible to calculate the longitude and latitude (probably 2 possibilities) of the third coordinate?

I have found these 2 answers: Calculating intersection of two Circles? How do I find the intersections of 2 circles on earths surface?

But did not understand them as I have finished my geometric lessons long ago :) I would be glad if someone could simplify it for me so I can find the third coordinate in an easy way.


1 Answer 1


The first example you cite has an answer that is probably the most direct, but it involves both dot products and cross products from vector algebra. Does the environment you're implementing this in have the capability to call on projection libraries to project the points into plane coordinates? If so, if you do that it becomes the simpler case of intersecting two planar circles. If not, dot products and cross products for 2 3-d vectors are not too much of a pain to implement, you can just look that up.

  • Hi, thank you for your answer. I am trying to implement this on Python, and luckily I have the library numpy to use the dot products and cross products. Unfortunately, this is not the difficulty I have encountered, the first example does not show how to get x0 (which I guess is the third possible coordinate), and therefore it is impossible to get "t". I have implemented a part of the algorithm here, and when checking my result, it wasn't close to the one presented in the post. I'd be glad if someone could correct me where I have been wrong: pastebin.com/jZvrcTUM Thanks!
    – toothpick
    Jun 20, 2014 at 19:58
  • First correction: converting to radians, the cited circle solution used some shorthand. Dividing nautmiles by 60 gives you degrees, not radians. Radians is pi/180 times degrees. So instead of distA/60 you want distA*pi/(60*180), which is distA*2.908882e-4. Jun 20, 2014 at 20:27
  • "x0 + tn" and "x0 - tn" in that example refer to the vector representations of the point you are solving for. In step 4 he defines x0 as a unique point on the intersection of the two planes, "x0 = ax1 + bx2". Try that. In other words, in your variable naming, x0 is a point with coordinates (axA + bxB, ayA + byB, azA + bzB). Jun 20, 2014 at 20:46
  • And referring to my first comment above, you should probably calculate out pi/(60*180) to more precision. Jun 20, 2014 at 20:47
  • Thanks! I think I have completed the algorithm: pastebin.com/kTyRa9bE But calculating "t" gives me difficulties because the number in the square root is negative, I think it is because my "a" and "b" result is different as the example above (for me a is 0.987769745626 and b is 0.987364416078). perhaps there is something wrong with how he presented the calculation formula?
    – toothpick
    Jun 20, 2014 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.