Wrapper function that executes the complete workflow from data download to SSM-appended tag data files output as CSV files.
imos_smru_qc(
wd = NULL,
cids = NULL,
sp = NULL,
smru.usr = NULL,
smru.pwd = NULL,
datadir = NULL,
meta.file = NULL,
outdir = NULL,
dropIDs = NULL,
proj = NULL,
model = "rw",
vmax = 3,
time.step = 6,
reroute = FALSE,
dist = 1000,
buffer = 0.5,
centroids = TRUE,
cut = FALSE,
min.gap = 72,
QCmode = "nrt",
output = FALSE,
dwnld = TRUE,
...
)
the path to the working directory that contains: 1) the data directory
where tag data files are stored (if source = local
); 2) the metadata directory
where all metadata files are stored; and 3) the destination directory for QC output.
SMRU campaign (AODN sattag_program) ID's
the species being QC'd - currently, either "sese" or "ortu"
SMRU data server username as a string
SMRU data server password as a string
the name of the data directory (to be added to the wd
path).
the metadata filename. Must reside within the wd
the name of the QC output directory where CSV files will be
written (to be added to the wd
path).
the SMRU ref ID's that are to be ignored during the QC process
the proj4string to be used for the location data & for the SSM-estimated locations. The default (NULL) will result in one of 3 projections being used, depending on whether the centroid of the observed latitudes lie in N or S polar regions, temperate or equatorial regions, or if tracks straddle (or lie close to) -180,180 longitude.
the aniMotum SSM model to be used for the location QC - typically
either rw
or crw
.
for SSM fitting; max travel rate (m/s) to identify implausible locations
the prediction interval (in hours) to be used by the SSM
whether QC'd tracks should be re-routed off of land
(default is FALSE). Note, in some circumstances this can substantially increase
processing time. Default land polygon data are sourced from the
ropensci/rnaturalearthhires
R package.
the distance in km from outside the convex hull of observed
locations from which to select land polygon data for re-routing. Ignored if
reroute = FALSE
.
the distance in km to buffer rerouted locations from the
coastline. Ignored if reroute = FALSE
.
whether centroids are to be included in the visibility graph
mesh used by the rerouting algorithm. See ?pathroutr::prt_visgraph
for
details. Ignored if reroute = FALSE
.
logical; should predicted locations be dropped if they lie within in a large data gap (default is FALSE).
the minimum data gap duration (h) to be used for cutting predicted locations (default is 72 h)
one of either nrt
for Near Real-Time QC or dm
for Delayed
Mode QC.
logical; should fn return a list of QC-generated objects. This results in a single large object return that can be useful for troubleshooting QC errors or undesirable results.
logical; should the tag data be downloaded from the SMRU server (default TRUE). Useful when testing so unnecessary load is not put on the SMRU server.
additional arguments to be passed to SSM model fitting, see
aniMotum::fit_ssm
for details.