471,873 Members | 1,644 Online

# Distance formula from Long/Lat Coord

Does anyone here have the formula for calculating distance give two pairs of

--
Greg
Nov 21 '05 #1
4 17220 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

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" <De********@toast.net> wrote in message
news:O3**************@TK2MSFTNGP11.phx.gbl...
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

Nov 21 '05 #2
WOW!! That is exactly what I needed! Thanks, Tom.

"Tom Dacon" <td****@community.nospam> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
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

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" <De********@toast.net> wrote in message
news:O3**************@TK2MSFTNGP11.phx.gbl...
Does anyone here have the formula for calculating distance give two
pairs of

--
Greg

Nov 21 '05 #3

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(d if))

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

Nov 21 '05 #4
Google is just great isnt it ?

--

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

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

"DellaCroce" <De********@toast.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
WOW!! That is exactly what I needed! Thanks, Tom.

"Tom Dacon" <td****@community.nospam> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
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

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" <De********@toast.net> wrote in message
news:O3**************@TK2MSFTNGP11.phx.gbl...
Does anyone here have the formula for calculating distance give two

pairs
of
--
Greg

Nov 21 '05 #5

### This discussion thread is closed

Replies have been disabled for this discussion.

### Similar topics

 20 posts views Thread by Xenophobe | last post: by 4 posts views Thread by Xenophobe | last post: by 2 posts views Thread by Galsaba | last post: by 2 posts views Thread by Bob Jenkins | last post: by 1 post views Thread by radskate360 | last post: by 1 post views Thread by tiffrobe | last post: by reply views Thread by PythonNotSoGuru | last post: by 105 posts views Thread by Keith Thompson | last post: by reply views Thread by jyoti kelkar | last post: by reply views Thread by antdb | last post: by reply views Thread by isladogs | last post: by reply views Thread by beacampos | last post: by 1 post views Thread by RonaldHiggins22 | last post: by 1 post views Thread by Sullster47 | last post: by 1 post views Thread by bsorge | last post: by 1 post views Thread by anoble1 | last post: by reply views Thread by beacampos | last post: by reply views Thread by jesuscortes0 | last post: by