473,651 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3844
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******** *************@u 72g2000cwu.goog legroups.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******** *************@u 72g2000cwu.goog legroups.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
4751
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') "> <span>Text<span> <div>
6
2801
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
2109
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 sender, System.EventArgs e) I can not figure out how can the System.EventArgs e be helpful to me. Can I get from the System.EventArgs e the Point where the mouse click for
3
2236
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
1248
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 simply 1, 5, 9,10,11,16,17,25,29 and I pass in a distance of 2 then I would want to end up with groups like 1, 5, (9,10,11), (16,17) ,25,29 So is grouped because each number is within a distance of 2 from
6
1687
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 other points already collected, in other words, if you're drawing a line it will only record points on the line every 6 pixels. How do I determine how far away one point is from another? if they are restricted to straight lines that's fine but as...
0
8345
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8789
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8456
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8570
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7293
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6156
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4279
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2694
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1584
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.