From: "Dann Corbit" Newsgroups: sci.math Subject: Re: help please! - distance between points on the Earth Date: Wed, 1 Apr 1998 11:36:47 -0800 news:comp.infosystems.gis is the best place to ask this. You can find a program on the net called proj.4. One of the programs in that system is called geod. It will calculate very accurate distances between two points. It even knows that the earth is not really a ball, but an oblate spheroid, and can compensate for that. -- Hypertext C-FAQ: http://www.eskimo.com/~scs/C-faq/top.html C-FAQ ftp: ftp://rtfm.mit.edu, C-FAQ Book: ISBN 0-201-84519-9 Try "C Programming: A Modern Approach" ISBN 0-393-96945-2 Want Software? Algorithms? Pubs? http://www.infoseek.com Andrea Forrest wrote in message <3522875f.834225@wingate>... >I want to calculate the distance between Newcastle upon Tyne and >Oxford (both UK) and the distance between Oxford and Paris (France - >obviously). I want the distance 'as the crow flies' i.e. along a >geodesic. > >I can easily find the longitute and latitude co-ordinates for >Newcastle, Oxford and Paris (although I don't have them to hand) >and I know that the angle between two vectors is easily determined >using A.B= |A||B| cos x >so, if I assume the Earth is spherical and know it's radius I can >determine the distances in question. > >I know this method works, I used it years ago to calculate the >distance from Paris to Dakar and was only out by about 1 mile in >2000.The thing is I can't remember how I did it! The main problem >seems to be determining the vector from the centre of the Earth to >each point with the Long. and Lat. co-ordinates to work from. > >Can anyone help me with this, I'm pretty sure I used spherical polar >co-ordinates. Or if anyone can come up with a better (accurate >method) please let me know. > >Cheers, Andrea. >Andrea@melodies.u-net.com >