Wrapper function that executes the complete workflow from data download to SSM-appended tag data files output as CSV files.
atn_wc_qc(
wd = NULL,
datadir = NULL,
meta.file = NULL,
outdir = NULL,
collab.id = NULL,
wc.akey = NULL,
wc.skey = NULL,
dropIDs = NULL,
model = "rw",
vmax = 3,
time.step = 6,
proj = NULL,
reroute = FALSE,
dist = 1000,
buffer = 0.5,
centroids = TRUE,
cut = FALSE,
min.gap = 72,
QCmode = "nrt",
p.int = 6,
output = FALSE,
...
)
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.
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 Wildlife Computers ID for a collaborator sharing data
a user's Access Key issued by Wildlife Computers for their API
a user's Secret Key issued by Wildlife Computers for their API
the ATN DeploymentID's that are to be ignored during the QC process
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
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.
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.
prediction interval to use for sub-sampling predicted locations (default = 6 h)
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.
additional arguments to be passed to SSM model fitting, see
aniMotum::fit_ssm
& aniMotum::route_path
for details.