filterSpeed: Calculates the ground speed for each location in a track and...

View source: R/General_Functions.R

filterSpeedR Documentation

Calculates the ground speed for each location in a track and removes locations requiring movements above a speed threshold.

Description

Calculates the ground speed for each location in a track and removes locations requiring movements above a speed threshold.

Usage

filterSpeed(data, lon = "lon", lat = "lat", time = "time", threshold)

Arguments

data

Data frame with tracking data for 1 individual, must contain fields with longitude, latitude, and time.

lon

Character string giving the name of longitude variable.

lat

Character string giving the name of latitude variable.

time

Character string giving the name of the time variable, time must be in POSIXct format.

threshold

Maximum ground speed for species in km/hr.

Value

Data frame with speed, distance between points, time between points added. Locations with unrealistic speeds are removed. The alogrithm is iterative, so consecutive unrealistic locations will be removed.

Warning

This function assumes that time values are in chronological order and all values are from a single individual. Make sure that your data are ordered, and use a for loop or some other method to apply this to multiple tracks


allisonglider/seabiRds documentation built on Feb. 14, 2025, 7:37 a.m.