Distance from a Point to a Great CircleDate: 05/24/2000 at 23:36:17 From: Dean Bellamy Subject: 'Perpendicular' distance from point to great circle Here's a variation on the "distance between two points specified by latitude and longitude" problem that's frequently asked. I have a great circle connecting two points A and B (specified by their latitude and longitude). I want the shortest great-circle distance to that great circle from a third point C (also specified by latitude and longitude). For example, given the shortest possible road connecting two cities, what is the shortest distance I'd have to walk from my position to that road. I can work out the perpendicular distance in a 2-D situation by finding the projection of AC on AB using a dot-product, but I'm not sure how to apply this to the surface of a sphere. Date: 05/25/2000 at 08:33:11 From: Doctor Rick Subject: Re: 'Perpendicular' distance from point to great circle Hi, Dean. Since you sound as if you're vector-savvy, I won't try to work this out in detail, but just give you an approach that should do the trick. Let vectors A and B be unit vectors pointing from the center of the earth toward points A and B. Take the cross-product of A and B and normalize the result to get a vector N: N = (A x B)/|A x B| N is normal to the plane of the great circle joining A to B. Now take the dot product of N with C, the unit vector corresponding to point C. N . C = cos(<NOC) where <NOC is the angle between N and C. The difference between this angle and a right angle is the arc corresponding to the distance from C to the great circle. Express it in radians and multiply by the radius of the earth, and you're done. If you need more explanation of any of these steps or concepts, just ask. There is some explanation of the use of spherical coordinates relative to longitude and latitude, and the use of cross products and dot products in this context, in various Dr. Math Archive items that you can find by searching for latitude longitude , for example. It sounds as if you may have seen these. - Doctor Rick, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/