Skip to contents

Pre-processing step that removes locations whose GPS geometry is unreliable before outlier-probability scoring. Bad-geometry fixes (too few satellites, high DOP, large eObs horizontal-accuracy estimate) typically land far from the true position and can dominate the histogram range used by mt_flag_outliers. Satellite count is the most canonical of these indicators: GPS requires at least four satellites for a trilateration-based fix, and fixes at the four-satellite boundary have pathological error geometry. A threshold of sat_min = 5 matches standard telemetry practice.

Usage

mt_filter_gps_quality(
  x,
  sat_min = 5,
  dop_max = 10,
  hacc_max = 100,
  drop_empty = TRUE,
  verbose = TRUE
)

Arguments

x

A move2 object.

sat_min

Integer. Keep fixes with at least this many satellites. Default 5. Set to NULL to skip.

dop_max

Numeric. Keep fixes with DOP at or below this value. Default 10. Set to NULL to skip.

hacc_max

Numeric. Keep fixes whose eobs_horizontal_accuracy_estimate (metres) is at or below this value. Default 100. Set to NULL to skip.

drop_empty

Logical. If TRUE (default), drop fixes whose geometry is empty (missing location). Set to FALSE to keep them – in which case downstream detectors will handle them as non-scorable rows.

verbose

Logical. If TRUE (default), report per-criterion drop counts via message().

Value

A move2 object with unreliable fixes removed. A message summarises how many were dropped by each criterion.

Details

Columns are detected by Movebank conventions (gps_satellite_count, gps_dop, eobs_horizontal_accuracy_estimate). Missing columns are skipped; to disable a criterion on a track that has the column, pass NULL for the corresponding argument.

Empty geometries (rows whose location is missing) are the limit case of an untrustworthy fix and are dropped by default. They have no bearing on sat/DOP/hacc but cannot be scored by any downstream detector, and their presence contaminates neighbour- based analyses. Set drop_empty = FALSE to keep them.

Examples

if (FALSE) { # \dontrun{
library(move2)
x <- mt_read(system.file("extdata", "Pettstadt1-14053.csv.gz",
                          package = "move2utils"))
x <- x[!sf::st_is_empty(x), ]
x <- mt_filter_unique(x, criterion = "first")
x <- mt_filter_gps_quality(x)
} # }