interp_equal: Track intermediate points

View source: R/interp_equal.R

interp_equalR Documentation

Track intermediate points

Description

Calculate great circle intermediate points on longitude, latitude input vectors. A spherical model is used, from the geosphere package.

Usage

interp_equal(x, distance = NULL, duration = NULL)

Arguments

x

trip object

distance

optional minimum distance (metres) between interpolated points

duration

optional minimum duration (seconds) between interpolated points

Details

For the result to be sensible, the input must either be in longitude/latitude, or be in a projection and have a valid CRS. Great circle movement is assumed, there's no way to use this to interpolate equal-distance in the native projection.

If no input distance or duration is provided a default is used of 15 points between each input point.

if both distance AND duration is provided, distance is ignored.

Note, the original implementation of this function was called 'interpequal()', and was used for time spent calculations. The functionality is now provided by the traipse package.

Value

S4 trip object with interpolated new locations based on distance or duration parameters


trip documentation built on July 9, 2023, 7:29 p.m.