I want to calculate an approximate location based on these inputs:

  • 3 locations identified by latitude and longitude anywhere on a planet
  • 3 angles, indicating the approximate direction from each of the 3 locations. For example, 0 degrees would be north, 90 degrees would be east, and so on.

The 3 angles will have some margin of error, so the 3 lines are unlikely to intersect exactly, and are likely to form a triangle, from which we can calculate some estimated area of interest. For example, we might calculate the center of the triangle, then draw a circle from that center that has the same areas as the triangle.

I would like to implement this in a computer program, where I can input the 3 locations, the 3 angles, and have it output a single location and radius.


1 Answer 1


You want to find the three intersection points of three pairs of great circles given a point and a bearing. Formulae for great circle intersections are given here:


There's a javascript widget there for testing, and code which you will have to convert to your unstated programming language of choice.

There's a python implementation here:


but hopefully now you know what to look for (great circle intersection) you can find one in the programming language you want to use.

  • This is perfect. It is covered in the moveable-type.co.uk link under the section "Intersection of two paths given start points and bearings". Commented Aug 8, 2016 at 19:43

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.