Get distance (km) between two locations previously called gcd.hf
calc_distance.Rd
Get distance (km) between two locations previously called gcd.hf
Arguments
- long1
Numeric Decimal degrees. Longitude of the first location.
- lat1
Numeric Decimal degrees. Latitude of the first location.
- long2
Numeric Decimal degrees. Longitude of the second location.
- lat2
Numeric Decimal degrees. Latitude of the second location.
Examples
calc_distance(long1 = 170, lat1 = 62, long2 = 170.1, lat2 = 62.1)
#> [1] 780.7205
calc_distance(long1 = -170, lat1 = -62, long2 = -170.1, lat2 = -62.1)
#> [1] 780.7205
calc_distance(long1 = 170, lat1 = -62, long2 = 170.1, lat2 = -62.1)
#> [1] 780.7205
calc_distance(long1 = 50, lat1 = 50, long2 = 50.1, lat2 = 50.1)
#> [1] 890.4222