ddfilter_speed: Filter locations by speed

ddfilter_speedR Documentation

Filter locations by speed

Description

A partial component of ddfilter, although works as a stand-alone function. This function removes locations by a given threshold speed as described in Shimada et al. (2012).

Usage

ddfilter_speed(sdata, vmax = 8.9, method = 1)

Arguments

sdata

A data frame containing columns with the following headers: "id", "DateTime", "lat", "lon", "qi". See the data turtle for an example. The function filters the input data by a unique "id" (e.g. transmitter number, identifier for each animal). "DateTime" is the GMT date & time of each location in class POSIXct or character with the following format "2012-06-03 01:33:46". "lat" and "lon" are the latitude and longitude of each location in decimal degrees. "qi" is the quality index associated with each location fix. The input values can be either the number of GPS satellites or Argos Location Classes. Argos Location Classes will be converted to numerical values, where "A", "B", "Z" will be replaced with "-1", "-2", "-3" respectively. The greater number indicates a higher accuracy.

vmax

A numeric value specifying a threshold of speed from a previous and/or to a subsequent fix. Default is 8.9km/h. If this value is unknown, it can be estimated from sdata using the function vmax.

method

An integer (1 or 2) specifying how locations should be filtered. Default is 1 and removes a location if the speed from a previous AND to a subsequent location exceeds vmax. Select 2 to remove a location if the speed from a previous OR to a subsequent location exceeds vmax. For the latter, the filter examines successive suspect locations (i.e. the speed from a previous and/or to a subsequent location exceeds vmax) and retain one location that is associated with the minimum speed from a previous and to a subsequent location.

Details

This function removes locations if the speed from a previous and/or to a subsequent location exceeds a given threshold speed. If vmax is unknown, it can be estimated using the function vmax.

Value

The input data is returned without locations identified by this filter. The following columns are added: "pTime", "sTime", "pDist", "sDist", "pSpeed", "sSpeed". "pTime" and "sTime" are hours from a previous and to a subsequent fix respectively. "pDist" and "sDist" are straight distances in kilometres from a previous and to a subsequent fix respectively. "pSpeed" and "sSpeed" are linear speed from a previous and to a subsequent fix respectively.

Author(s)

Takahiro Shimada

References

Shimada T, Jones R, Limpus C, Hamann M (2012) Improving data retention and home range estimates by data-driven screening. Marine Ecology Progress Series 457:171-180 \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3354/meps09747")}

See Also

ddfilter, ddfilter_loop, vmax, track_param


SDLfilter documentation built on Nov. 10, 2023, 1:11 a.m.