test_pp_swift: Test locational accuracy of PinPoint Swift fixes against a...

Description Usage Arguments Details Value Examples

View source: R/test_pp_swift.R

Description

This function evaluates the locational accuracy of PinPoint Swift fixes by comparing them to an input reference coordinate (i.e., tag location in lat/long decimal degrees WGS84). The most convenient input is a 'pp_df' class data.frame produced by read_pp_swift. Failed GPS fix attempts are removed automatically. Users can optionally filter GPS fixes by the reported horizontal dilution of precision 'max_hdop' or the number of satellites 'min_sats'. Limited experimentation finds fixes with at least 4 satellites and an HDOP <= 20 and to be of adequate locational quality, with an RMS of about 20 m (see details). These are the defaults. For larger scale studies, fixes from 3 satellites may also be useful.

Usage

1
2
test_pp_swift(pp_df, ref_coords = c(-83.36, 33.95), min_sats = 4,
  max_hdop = 20)

Arguments

pp_df

a 'pp_df' object (i.e., a 'data.frame' created by read_pp_swift)

ref_coords

a vector of coordinates (decimal degrees, WGS84 datum) of the reference location in the form c(longitude, latitude).

min_sats

numeric/integer scalar indicating the minimum number of satellites required (default is 4) to accept a GPS fix as valid.

max_hdop

numeric scalar indicating the maximum dilution of precision (default is <= 20) to accept a GPS fix as valid.

Details

The reported 2-D RMS error assumes that errors in the north-south and east-west directions are equivalent (i.e., that locational fixes describe a circular distribution around the true position; likely reasonable with >= 4 satellites). Assuming also that mean positional error is zero (or close to it), RMS is essentially equivalent to 1 standard devation, which in the two-directional case means that a circle of radius RMS is expected to contain about 63% of positional locations on average; double it for the 95% equivalent. See Diggelen (2007) for more details: http://gpsworld.com/gpsgnss-accuracy-lies-damn-lies-and-statistics-1134/)

Value

A histogram of locational errors (with median highlighted) and a report of 2-D RMS error by tag ID, and a 'pp_df' object containing the input data and two new columns:

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Select apprpriate text files from file selection window that opens
pp_tests <- list.files(path = system.file("extdata", package = "pinpoint"), full.names = TRUE)
dat <- read_pp_swift(pp_tests)
dat <- test_pp_swift(dat, ref_coords = c(-83.360298, 33.895814))
dat <- test_pp_swift(dat, min_sats = 9, ref_coords = c(-83.360298, 33.895814))

## End(Not run)

adamdsmith/pinpoint documentation built on Aug. 12, 2021, 12:53 a.m.