Correlated Random Walk Filter
Description
Format track data for filtering
Usage
1  dat4jags(d, tstep = 1, tpar = tpar())

Arguments
d 
a data frame of observations (see details) 
tstep 
the time step to predict to (in days) 
tpar 
generalised tdistribution parameters for ARGOS location classes. By
default dat4jags uses the parameters estimated in Jonsen et al (2005) Ecology 86:28742880
but users may specify other ARGOS error parameter values via the 
Details
This is an internal function used by fit_ssm
to format track
data for JAGS.
The input track is given as a dataframe where each row is an observed location and columns
 'id'
individual animal identifier,
 'date'
observation time (POSIXct,GMT),
 'lc'
ARGOS location class,
 'lon'
observed longitude,
 'lat'
observed latitude.
Location classes can include Z, F, and G; where the latter two
are used to designate fixed (known) locations (e.g. GPS locations)
and "generic" locations (e.g. geolocation data) where the user
supplies the error standard deviations, either via the
tpar
function or as two extra columns in the input data.
From this dat4jags
calculates interpolation indices idx
and
weights ws
such that if x
is the matrix of predicted
states, the fitted locations are ws*x[idx+1,] +
(1ws)*x[idx+2,]
.
Value
A list with components

the unique identifier for each dataset 

a 2 column matrix of the lon,lat observations 

a 2 column matrix of the ARGOS precision (1/scale) parameters 

a 2 column matrix of the ARGOS df parameters 

a vector of interpolation indices 

a vector of interpolation weights 

the times at which states are predicted (POSIXct,GMT) 

the input observed data frame 

the time step specified in the 
References
Jonsen ID, Mills Flemming J, Myers RA (2005) Robust statespace modeling of animal movement data. Ecology 86:28742880 (Appendix A)