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
prefilter(data, vmax = 50, ang = -1, distlim = c(2500, 5000),
spdf = TRUE, min.dt = 60, emf = NULL)
input data - must have 5 (LS), or 8 (KF) columns (see details)
max travel rate (m/s) - see ?argosfilter::sdafilter
for details
angles of outlier location "spikes" - see ?argosfilter::sdafilter
for details
lengths of outlier location "spikes" - see ?argosfilter::sdafilter
for details
turn speed filter on/off (logical; default is TRUE)
minimum allowable time difference between observations; dt < min.dt
will be ignored by the SSM
optionally supplied data.frame of error multiplication factors for Argos location quality classes. see Details
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
emf_x
error multiplication factors for x
direction
emf_y
error multiplication factors for y
direction
geometry
sf POINT object giving x,y
coordinates in km
called by fit_ssm
.
User-specified Error Multiplication Factors (emf). emf's must be provided as a data.frame with the following columns:
emf.x
emf values for the x
direction
emf.y
emf values for y
direction
lc
location class designations
The location class designations can be the standard Argos lc values: 3, 2, 1, 0, A, B, Z or other values. The number of classes specified is flexible though may not be amenable to a large number of classes. Whatever class designations are chosen must also appear in the input data lc
column. A GPS location class ("G") is provided by default and assumes that GPS locations are 10 x more precise than Argos lc 3 locations.
# NOT RUN {
data(ellie)
pf <- prefilter(ellie, vmax=4, ang=c(15,25), min.dt=120)
pf
# }
Run the code above in your browser using DataLab