Distance


Calculation of the distance (km, meters, mile, foot) between two point in the earth, is possible calcolate the bearing angle between the points and the destination point with start point, distance and bearing.

Format:   Info
coo. dd:  [-]deg.dddddd , [-]deg.dddddd   Info  search
coordinate: 
coo. dms: 
coo. dd:  [-]deg.dddddd , [-]deg.dddddd   Info  search
coordinate B: 
coo.B dms: 41° 53´ 2.4" N 12° 29´ 31.2" E
distance  
bearing     ° degrees



Content

  Format

  Calculating the distance between two geographical points

  Calculation of direction between two geographical points

  Calculation of the destination point

  Comment

top Back to top      contents Content 

Format

Value range

   Valid value for the latitude are from -90.0° to 90.0° for the longitude are from -180.0° to 180.0°, the + sign should be omitted, while the minus sign is not necessary if there is a radio component to select the direction N-S or W-E (Degree and Decimal format).

Decimal

   You have to select a direction (N-S or W-E) and insert a number from 0 to 90 for the latitude or from 0 to 180 for the longitude (example 45.12345).

Degree

   Degree format is composed of direction (N-S or W-E) and three sets of numbers separate by the symbols for degrees (°), minutes (’), and seconds (").
   Degree is an integer value without sign, from 0 to 90 for the latitude or from 0 to 180 for the longitude. Minute is an integer value without sign, from 0 to 59. Seconds is a double value without sign, from 0 (or 0.0000) to 59.9999.

Coordinates

   Coordinates format is the pair of latitude and longitude, with sign minus (-) for the direction south latitude and west longitude separate by comma symbol (,), here some example:
     52.5163 , 13.3779
     40.7682 , -73.9816
     -22.9708 , -43.1830

Search on map

   Click on search search to open the webpage Earth Coordinate, here you obtain the latitude and longitude simply by clicking on the map, and save the value by the button save.

top Back to top      contents Content 

Calculating the distance between two geographical points

The formula used to determine the shortest distance between two points on the land (geodesic), approximates the geoid to a sphere of radius R = 6372.795477598 km (radius quadric medium), so the calculation could have a distance error of 0.3%, particularly in the polar extremes, and for long distances through various parallel. Given two points A and B on the sphere expressed by latitude (lat) and longitude (lon) you will have:

distance (A, B) = R * arccos (sin(latA) * sin(latB) + cos(latA) * cos(latB) * cos(lonA-lonB))

The angles used are expressed in radians, converting between degrees and radians is obtained by multiplying the angle by pi and dividing by 180.

top Back to top      contents Content 

Calculation of direction between two geographical points

To determine the direction from the starting point between two points on the earth, use the following formula:

Δφ = ln( tan( latB / 2 + π / 4 ) / tan( latA / 2 + π / 4) )
Δlon = abs( lonA - lonB )
bearing :  θ = atan2( Δlon ,  Δφ )

Note: 1) ln = natural log      2) if Δlon > 180°  then   Δlon = Δlon (mod 180).

top Back to top      contents Content 

Calculation of the destination point

To determine the destination point, knowing the starting point the direction θ and the distance d, we use the following formula:

latB = asin( sin( latA) * cos( d / R ) + cos( latA ) * sin( d / R ) * cos( θ ))
lonB = lonA + atan2(sin( θ ) * sin( d / R ) * cos( latA ), cos( d / R ) − sin( latA ) * sin( latB ))

top Back to top      contents Content 

Comment

If detected inaccuracies bug, want to suggest new features or simply express your opinion of the site web add a comment.
Thanks in advance for your contribution to improve this site.



Email (optional)
Comment (required)       (use English or Italian)
Validation code (required)
code

top Back to top      contents Content 

Reported by: