Latitude, Longitude, And Great Circle Distances
By Chip Pearson
www.cpearson.com/Excel/LatLong.aspx
[email protected]
17-Jan-2009
This worksheet contains formulas for working with Latitude and Longitude values in Excel. It also illustrates formula
calculating the Great Circle Distance between two points on Earth.
Raduis Of Earth (mean) Miles 3958.82
Kilometers 6371.10
Input fields are in green.
Calculated fields are in red.
Great Circle Distances
A Great Circle Distance is the shortest distance between two points on a sphere. All lines of Longitude are Great C
The only latitudinal Great Circle is the Equator.
The functions in this worksheet use the RADIANS function, which is part of the Analysis Tool Pak, so the Analysis T
be loaded (Tools menu, Add-Ins item).
A Great Circle Distance is calculated by finding the interior spherical angle between the two points and then multipl
angle by the radius of the Earth. The interior spherical angle is calculated with the following equation (known as the
Where Ds Interior Spherical Angle
Df Latitude1 - Latitude2
fs Latitude1
ff Latitude2
Dl Longitude1 - Longitude2
This angle multiplied by the radius of the Earth yields the Great Circle Distance between to locations.
Excel's trigonometric functions (SIN, COS, etc) work with Radians rather than Degrees, so the Latitude and Longitu
These functions use the RADIANS function to carry out the conversion. This function is part of the Analysis Tool Pa
loaded (Tools Menu, then Add-Ins item). This add-in is not required with Excel 2007 and later.
Using Time Format Degress, Minutes, and Seconds
This section illustrates converting deg:min:sec values to degrees, minutes and seconds, and to
and calculating the distance between two locations. Distance is also calculated from Radians.
Latitude Longitude
Location1 Deg:Min:Sec 01º 00' 00" 100º 00' 00" In these cells, enter the value
Location2 Deg:Min:Sec 00º 00' 00" 100º 00' 00"
Latitude
Deg Min Sec Deg
Location1 1 0 0 100
Location2 0 0 0 100
Decimal Degrees Latitude Longitude Radians =(Degrees/180)*PI
Location1 1 100 0.0174533 1.745329
Location2 0 100 0 1.745329
Distance Kilometers Miles (statute) Kilometers Miles
111.197 69.094 111.197 69.094
Using Decimal Degrees
This section illustrates converting between decimal degrees and degrees, minutes, and second
calculating the distance between two locations.
Conversion with array formula
Latitude Longitude Degrees
Location1 Dec Degrees 20.5111 0.0000 20
Location2 Dec Degrees 0.0000 0.0000 0
Distance Kilometers Miles (statute)
2280.766 1417.202
Initial And Ending Bearings
The Start Bearing is the compass direction that one should set
sail to sail on a great circle. End Bearing is the compass direction
that you will be going when you arrive at your destination.
North1 East1
0.0000 0.0000
North2 East2
0 45
Start Bearing End Bearing
90 270
Excel. It also illustrates formulas for
lines of Longitude are Great Circles.
ysis Tool Pak, so the Analysis Tool Pak add-in must
the two points and then multiplying that
llowing equation (known as the Haversine Formula).
ween to locations.
es, so the Latitude and Longitude values must be converted to RADIANS.
n is part of the Analysis Tool Pak, so this add-in must be
, minutes and seconds, and to decimal degrees
also calculated from Radians.
In these cells, enter the values as time, deg:min:ss
Longitude
Min Sec
0 0
0 0
=(Degrees/180)*PI
degrees, minutes, and seconds, and
Conversion with array formula
Minutes Seconds
30 40
0 0