PC Review


Reply
Thread Tools Rate Thread

Distance formula from Long/Lat Coord

 
 
DellaCroce
Guest
Posts: n/a
 
      8th Aug 2004
Does anyone here have the formula for calculating distance give two pairs of
Longitude/Latitude coordinates? Please share this with me if you would.

--
Greg


 
Reply With Quote
 
 
 
 
Tom Dacon
Guest
Posts: n/a
 
      8th Aug 2004
Convert the latitudes and longitudes to radians, observing that latitude is
positive in the northern hemisphere, and negative in the southern
hemisphere, and by convention among astronomers east longitude is positive
and west longitude is negative (why? No one knows).

Let's call one point the 'start point' and the other one the 'end point.

Let L be the start point latitude in radians, and D be the end point
latitude in radians.

Let LHA be the difference between the two longitudes, in radians.

Then the sine of the distance angle between the two points, measured from
the center of the earth, is:

sin(distance angle) = sin(L) * sin(D) + cos(L) * cos(D) * cos(LHA)

and the angle in radians of the distance angle is:

da = asin(distance angle).

Convert this angle to degrees.

On a theoretically spherical earth, an angle of one degree subtends 60
nautical miles. So multiply the distance angle in degrees by sixty, and you
have what's called the "Great Circle Distance" between the points in
nautical miles of 6000 feet. To convert to land miles, multiply by
6000/5280.

Regards,
Tom Dacon
Dacon Software Consulting


"DellaCroce" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Does anyone here have the formula for calculating distance give two pairs

of
> Longitude/Latitude coordinates? Please share this with me if you would.
>
> --
> Greg
>
>



 
Reply With Quote
 
DellaCroce
Guest
Posts: n/a
 
      8th Aug 2004
WOW!! That is exactly what I needed! Thanks, Tom.

"Tom Dacon" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Convert the latitudes and longitudes to radians, observing that latitude

is
> positive in the northern hemisphere, and negative in the southern
> hemisphere, and by convention among astronomers east longitude is positive
> and west longitude is negative (why? No one knows).
>
> Let's call one point the 'start point' and the other one the 'end point.
>
> Let L be the start point latitude in radians, and D be the end point
> latitude in radians.
>
> Let LHA be the difference between the two longitudes, in radians.
>
> Then the sine of the distance angle between the two points, measured from
> the center of the earth, is:
>
> sin(distance angle) = sin(L) * sin(D) + cos(L) * cos(D) * cos(LHA)
>
> and the angle in radians of the distance angle is:
>
> da = asin(distance angle).
>
> Convert this angle to degrees.
>
> On a theoretically spherical earth, an angle of one degree subtends 60
> nautical miles. So multiply the distance angle in degrees by sixty, and

you
> have what's called the "Great Circle Distance" between the points in
> nautical miles of 6000 feet. To convert to land miles, multiply by
> 6000/5280.
>
> Regards,
> Tom Dacon
> Dacon Software Consulting
>
>
> "DellaCroce" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Does anyone here have the formula for calculating distance give two

pairs
> of
> > Longitude/Latitude coordinates? Please share this with me if you would.
> >
> > --
> > Greg
> >
> >

>
>



 
Reply With Quote
 
user@domain.invalid
Guest
Posts: n/a
 
      8th Aug 2004



Dim AdjLatDist, dif, xdist As Double

DegLatDist = 111.13295-0.55982*Cos(2*lat1)+0.00012*Cos(5*lat1)

dif = Abs(lon1 - lon2)

xdist = Acos(Sin(lat1)*Sin(lat2)+Cos(lat1)*Cos(lat2)*Cos(dif))

return xdist * (180/pi) * DegLatDist

' Result in KM - for mile multiply by .6214

Denis


DellaCroce wrote:
> Does anyone here have the formula for calculating distance give two pairs of
> Longitude/Latitude coordinates? Please share this with me if you would.
>


 
Reply With Quote
 
One Handed Man \( OHM - Terry Burns \)
Guest
Posts: n/a
 
      8th Aug 2004
Google is just great isnt it ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"DellaCroce" <(E-Mail Removed)> wrote in message
news:%23V$(E-Mail Removed)...
> WOW!! That is exactly what I needed! Thanks, Tom.
>
> "Tom Dacon" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Convert the latitudes and longitudes to radians, observing that latitude

> is
> > positive in the northern hemisphere, and negative in the southern
> > hemisphere, and by convention among astronomers east longitude is

positive
> > and west longitude is negative (why? No one knows).
> >
> > Let's call one point the 'start point' and the other one the 'end point.
> >
> > Let L be the start point latitude in radians, and D be the end point
> > latitude in radians.
> >
> > Let LHA be the difference between the two longitudes, in radians.
> >
> > Then the sine of the distance angle between the two points, measured

from
> > the center of the earth, is:
> >
> > sin(distance angle) = sin(L) * sin(D) + cos(L) * cos(D) * cos(LHA)
> >
> > and the angle in radians of the distance angle is:
> >
> > da = asin(distance angle).
> >
> > Convert this angle to degrees.
> >
> > On a theoretically spherical earth, an angle of one degree subtends 60
> > nautical miles. So multiply the distance angle in degrees by sixty, and

> you
> > have what's called the "Great Circle Distance" between the points in
> > nautical miles of 6000 feet. To convert to land miles, multiply by
> > 6000/5280.
> >
> > Regards,
> > Tom Dacon
> > Dacon Software Consulting
> >
> >
> > "DellaCroce" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Does anyone here have the formula for calculating distance give two

> pairs
> > of
> > > Longitude/Latitude coordinates? Please share this with me if you

would.
> > >
> > > --
> > > Greg
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Will this formula work in Access (distance between Lat/Long points =?Utf-8?B?ZWZhbmRhbmdv?= Microsoft Access VBA Modules 1 24th Oct 2007 07:38 AM
Long Distance? Ernie Cox Windows XP Print / Fax 2 14th Sep 2005 04:24 AM
Re: Sending long distance fax =?Utf-8?B?amFuYXN0YXJy?= Windows XP Print / Fax 0 8th Aug 2004 02:25 AM
Faxing long-distance Windows XP Print / Fax 2 26th Feb 2004 04:38 PM
can't fax long distance jssII Windows XP Print / Fax 1 24th Feb 2004 01:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:00 PM.