Link to home
Start Free TrialLog in
Avatar of Geoff Millikan
Geoff MillikanFlag for United States of America

asked on

Getting the latitude and longitude of the intersection points of two overlapping circles

In the below diagram we have two circles with middle points of P0 and P1.  What is given is:

» Point "P0" is at latitude 34.1837710, longitude -118.9484950
» Point "P1" is at latitude 34.1946740, longitude -118.9249500.  
» The line "r0" is 7764 feet in length
» The line "r1" is 3574 feet in length

What is the latitude and longitude of point P3?

All on my own (smile), I figured out (using the formulas at the link below) the length of "a" is 6987.7 feet and "h" is 3384.0 feet.  So I know the lengths of each side of the triangle and therefore I know all the angles in the triangle.

But now mathematically, how to I get the latitude and longitude of P3?

http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/


2circle1.gif
Avatar of Otto_N
Otto_N
Flag of South Africa image

It seems that the link refers to circles on a flat plane, while your question suggest that you're dealing with locations on the Earth's surface.  But because you are dealing with small displacements, it should be a close approcimation.

One way to tackle this is to use the Haversine function, and write it for r0 and r1 respectively in terms of P3(x3,y3).  This should give you two equations with two variables, that you should be able to solve using trig functions.  But this can be somewhat tricky (I surely do not remember enough trigonometry to attempt this, even if I had the time).

If you want to stick to the flat plane approximation, you will need to determine the angle of P0-P1, so that you can break a and h down into latitude and longitude components.  Then you need to change the length to degrees latt and degrees long.  Then it is just a case of
P3 latt = P0 latt + a latt + h latt    and
P3 long = P0 long + a long + h long

Note that, from the drawing, it seems that the longitudinal component of h is negative.

Good luck!
Avatar of Geoff Millikan

ASKER

*Otto_N* Thanks for the reply!  Agreed, re-writing Haversine is beyond me - if I could do that, I probabally wouldn't need to be asking for help here.

Getting angle of P0-P1 is easy since we know length of P0-P1 and it forms a right angle triangle with the horizon at 180 degrees.  However, I don't believe that helps us.  Why?  Well, after finding the angle you say, "..so that you can break a and h down into latitude and longitude components."

But how do we "...break a and h down into latitude and longitude components?"  If we knew how to do that, then we could break P3 into  latitude and longitude components and we would have our answer.  So I'm not sure we're any better off.

Again, all the lengths of the lines and angles can be found.  The issue at hand is converting those lengths and angels into latitude and longitude components without 40 pages of trigonometry.

Can anyone help?
ASKER CERTIFIED SOLUTION
Avatar of Otto_N
Otto_N
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Still testing here... Give me a few days..
Where you able to use the info I provided?  Let me know if there is something you still need help with.
I haven't fully tested it yep but I'm so impressed that you took the time to redraw the image to help explain it.  I'm going to accept answer at this time.  Thanks for your work on this.