SunEarthTools.com | ||

Tools for consumers and designers of solar |

Home > Tools > Distance

# Distance

Drag the marker on map to calculate distance (km, meters, mile, foot) and bearing angle of direction on google map, between two points of the earth.

## Content

#### Format

#### Calculating the distance between two geographical points

#### Calculation of direction between two geographical points

#### Calculation of the destination point

#### Determinate speed or time elapsed

#### Comment

Back to top
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 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.

Back to top 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.

Back to top 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( lat_{B} / 2 + π / 4 ) / tan( lat_{A} / 2 + π / 4) )

Δlon = abs( lon_{A} - lon_{B} )

bearing : θ = atan2( Δlon , Δφ )

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

Back to top 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:

lat_{B} = asin( sin( lat_{A}) * cos( d / R ) + cos( lat_{A} ) * sin( d / R ) * cos( θ ))

lon_{B} = lon_{A} + atan2(sin( θ ) * sin( d / R ) * cos( lat_{A} ), cos( d / R ) − sin( lat_{A} ) * sin( lat_{B} ))

Back to top Content

### Determinate speed or time elapsed

After calculating the distance between two points, you get the speed if we know the time spent to journey from point A to the B.

Enter the elapsed time in the format hh:mm:ss to get the average speed.

If you know the ending point, and the average speed you can get the time to reach point B.

You can enter the time in point A and the point B in order to obtain the average speed.

Back to top Content

### Comment

If you detect a bug or other inaccuracy, want to suggest a new feature or simply want to express an opinion about the site, feel free to do in the "Comment" section that follows (or directly with an email). The site administrators appreciate all comments as we strive to produce an accurate and constructive resource.

Thanks in advance for your contribution to improve this site (please correct the errors of grammar and translation).

Back to top Content

Drag the marker on map to calculate distance (km, meters, mile, foot) and bearing angle of direction on google map, between two points of the earth.

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.

52.5163 , 13.3779

40.7682 , -73.9816

-22.9708 , -43.1830

Back to top Content

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.

Back to top Content

Δφ = ln( tan( lat

Δlon = abs( lon

bearing : θ = atan2( Δlon , Δφ )

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

Back to top Content

lat

lon

Back to top Content

Enter the elapsed time in the format hh:mm:ss to get the average speed.

If you know the ending point, and the average speed you can get the time to reach point B.

You can enter the time in point A and the point B in order to obtain the average speed.

Back to top Content

Thanks in advance for your contribution to improve this site (please correct the errors of grammar and translation).

Back to top Content