how to caculate the real distance between two geographical point(from GPS)?

N

Nick

hi, guys

I don't know where should I put this post, because this is a general
question, not really a c# question.
The question is how to caculate the real distance between two
geographical point? For example, i know two positions from my gps,
longitude and latitude. how to know to caculate how many miles between
these two points.
There are many websites doing this in search, enter the miles as
radius, and only show the results fall in that area.
Any help will be appreciated.

Thanks.
 
N

Nick Hounsome

Jacob said:
This is a good site for the formulas:
http://www.movable-type.co.uk/scripts/LatLong.html

If your GPS points are close you may be able to get by with a straight
line calculation using Pythagoras.

I also developed a .NET control for Google Maps, included in it is a
.NET class for geographic calculations (distance, bearing etc.) you can
download it at http://www.reimers.dk

If you are looking for the nearest burger joint to the north pole you're not
going to have much luck specifying a radius of 5 miles anyway :)
 
K

Kevin Spencer

That's a pretty good reference. It relies on the Mean Earth radius, that is,
as the earth is an ellipsoid (actually a geoid), it takes the average radius
of the earth, which yields results that are more or less accurate. To get a
more accurate measurement, you can use an ellipsoidal model, or a geodetic
model, both of which are a good bit more accurate. The only problem with the
geodetic model is that there are so many variations, called "geodetic
datums" that are all similar but slightly different, to choose from. In most
cases, the ellipsoidal model will give a highly accurate result. Here is
another reference which may be helpful:

http://www.ga.gov.au/geodesy/datums/calcs.jsp

You may also find some good information from the Open Geospatial Consortium,
a fairly new organization which is working on standardizing many GIS-related
technologies:

http://www.opengeospatial.org/

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top