View source: R/General_Functions.R
filterSpeed | R Documentation |
Calculates the ground speed for each location in a track and removes locations requiring movements above a speed threshold.
filterSpeed(data, lon = "lon", lat = "lat", time = "time", threshold)
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. |
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.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.