prefilter: Prepare Argos data for fitting state-space model

Description Usage Arguments Details Value Examples

Description

prefilter (1) determines Argos data type (LS or KF); (2) converts dates to POSIXt & identifies observations with duplicate dates; (3) orders observations in time; (4) removes duplicate observations; (5) removes observations occurring within 60 s of one another (keeps first); (6) shifts longitudes that straddle -180,180 to 0,360 and vice-versa; (7) projects lonlat coords to mercator x,y coords (in km); (8) adds location error multiplication factors based on Argos location class (for type LS); (9) uses a argosfilter::sdafilter to identify potential outlier locations (by distance only) to be ignored when fitting the ctrw model

Usage

1
2
prefilter(data, vmax = 50, ang = -1, distlim = c(2500, 5000),
  spdf = TRUE, min.dt = 60)

Arguments

data

input data - must have 5 (LS), or 8 (KF) columns (see details)

vmax

max travel rate (m/s) - see ?argosfilter::sdafilter for details

ang

angles of outlier location "spikes" - see ?argosfilter::sdafilter for details

distlim

lengths of outlier location "spikes" - see ?argosfilter::sdafilter for details

spdf

turn speed filter on/off (logical; default is TRUE)

min.dt

minimum allowable time difference between observations; dt < min.dt will be ignored by the SSM

Details

called by fit_ssm.

Value

an sf object with all observations passed from data and the following appended columns

keep

logical indicating whether observation should be ignored by sfilter (FALSE)

obs.type

flag indicating whether KF or LS measurement model applies

amf_x

Argos error multiplication factor for x direction

amf_y

Argos error multiplication factor for y direction

geometry

sf POINT object giving x,y coordinates in km

Examples

1
2
3
data(ellie)
pf <- prefilter(ellie, vmax=10, ang=c(15,25), min.dt=120)
pf

bmcclintock/crwHMM documentation built on May 7, 2019, 12:51 a.m.