geodesic.distance: Calculate the great-circle distance

Description Usage Arguments Value Examples

View source: R/geotagging_functions.R

Description

geodesic.distance calculates the great-circle distance between two points

Usage

1
geodesic.distance(lon1, lat1, lon2, lat2)

Arguments

lon1

Longititude of point 1

lat1

Latitude ot point 1

lon2

Longititude of point 2

lat2

Latitude ot point 2

Value

Distance in meters

Examples

1
2
3
4
# Distance from Toronto to Ottawa in m
dist_otttor <- geodesic.distance(-75.695000, 45.424721, -79.347015, 43.651070)
# in km
dist_ottor / 1000

jngtz/rdupilot documentation built on Oct. 3, 2020, 12:45 a.m.