Skip to contents

Check and clean GPS data from ARU logs. GPS points are checked for obvious problems (expected range, distance cutoffs and timing) then attached to the meta data frame. Note that it is often safer and more reliable to create your own Site Index file including site ids, and GPS coordinates. This file can be cleaned and prepared with clean_site_index() instead.

Usage

clean_gps(
  meta = NULL,
  dist_cutoff = 100,
  dist_crs = 3161,
  dist_by = c("site_id", "aru_id"),
  quiet = FALSE,
  verbose = FALSE
)

Arguments

meta

Data frame. Output of clean_metadata().

dist_cutoff

Numeric. Maximum distance (m) between GPS points within a site. Default is 100m but can be set to Inf to skip.

dist_crs

Numeric. Coordinate Reference System to use when calculating distance (should be one with m).

dist_by

Character. Column which identifies sites within which to compare distance among GPS points. Only valid if dist_cutoff is not Inf.

quiet

Logical. Whether to suppress progress messages and other non-essential updates.

verbose

Logical. Show extra loading information. Default FALSE.

Value

Data frame of site-level metadata.

Details

If checking for a maximum distance (dist_cutoff) among GPS points within a group (dist_by), the returned data frame will include a column max_dist, which represents the largest distance among points within that group.

Examples

if (FALSE) { # dir.exists("my_project")
m <- clean_metadata(project_dir = "my_project")
g <- clean_gps(meta = m)
}