Calculate geodesic distance on longitude, latitude input vectors. The unit of distance is metres.
By convention the first value is set to
NA missing value, because the
distance applies to each sequential pair of locations.
To use this on multiple track ids, use a grouped data frame with tidyverse
data %>% group_by(id) %>% mutate(distance = track_distance(lon, lat))
numeric vector of distances between sequential pairs of x, y in metres, see Details
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.