473,382 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

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.

Apr 20 '06 #1
4 3831
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

Apr 20 '06 #2

"Jacob" <ja***@reimers.dk> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
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 :-)
Apr 20 '06 #3
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.

"Jacob" <ja***@reimers.dk> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
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

Apr 20 '06 #4
This is great, thank you all.

Apr 21 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: qwerty | last post by:
Following works in Mozilla, Opera and IE. <div style=" left: 100px; right: 200px; /* JavaScript-hack for IE*/ width: expression((document.body.clientWidth - 100 - 200) + 'px') ">...
6
by: Affan Syed | last post by:
Hi, the file that i read has the following column as input: 1.000005 1.00001 1.000015 1.00002 1.000025 Now I have float variable skew.
9
by: Sharon | last post by:
I have a Forms.ContextMenu with some Forms.MenuItem that has EventHandler for the Click event. The event handler function has the following signature: private void OnMenuItemClick(object...
3
by: byteschreck | last post by:
Is it possible to change the distance from the form's border the form designer suggests when you use snaplines? I think it should be smaller.
1
by: Erik Nodland | last post by:
Hi Everyone, Just after some ideas and suggestions on how to do this. I have a large amount of numeric data which I would like to group given a distance as a parameter. IE. If my dataset was...
6
by: Tom P. | last post by:
I am writing a drawing program but I want to keep the scale down (there could end up being several hundred objects on the screen). I want to limit the points collected to a certain distance from...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.