track_speed: Track speed

Description Usage Arguments Details Value Examples

View source: R/track_speed.R

Description

Calculate speed (m/s) based on geodesic distance with longitude, latitude, date-time input vectors. The unit of speed is metres per second.

Usage

1

Arguments

x

longitude

y

latitude

date

date-time in POSIXct

Details

By convention the first value is set to NA missing value, because the difference applies to each sequential pair of locations.

To use this on multiple track ids, use a grouped data frame with tidyverse code like data %>% group_by(id) %>% mutate(speed = track_speed(lon, lat, date))

Value

numeric vector of sequential distances in metres per second, see Details

Examples

1

traipse documentation built on Jan. 13, 2021, 7:11 a.m.