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,
  ...
)

Arguments

wd

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.

datadir

the name of the data directory (to be added to the wd path).

meta.file

the metadata filename. Must reside within the wd

outdir

the name of the QC output directory where CSV files will be written (to be added to the wd path).

collab.id

the Wildlife Computers ID for a collaborator sharing data

wc.akey

a user's Access Key issued by Wildlife Computers for their API

wc.skey

a user's Secret Key issued by Wildlife Computers for their API

dropIDs

the ATN DeploymentID's that are to be ignored during the QC process

model

the aniMotum SSM model to be used for the location QC - typically either rw or crw.

vmax

for SSM fitting; max travel rate (m/s) to identify implausible locations

time.step

the prediction interval (in hours) to be used by the SSM

proj

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.

reroute

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.

dist

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.

buffer

the distance in km to buffer rerouted locations from the coastline. Ignored if reroute = FALSE.

centroids

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.

cut

logical; should predicted locations be dropped if they lie within in a large data gap (default is FALSE).

min.gap

the minimum data gap duration (h) to be used for cutting predicted locations (default is 72 h)

QCmode

one of either nrt for Near Real-Time QC or dm for Delayed Mode QC.

p.int

prediction interval to use for sub-sampling predicted locations (default = 6 h)

output

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.