A function to clean data accessed from the NIOZ WATLAS server.

wat_clean_data(
  data,
  moving_window = 3,
  nbs_min = 0,
  sd_threshold = 5e+05,
  filter_speed = TRUE,
  speed_cutoff = 150
)

Arguments

data

A dataframe object returned by getData. Must contain the columns "X", "Y", "SD", "NBS", "TAG", "TIME"; these are the X coordinate, Y coordinate, standard deviation in measurement, number of ATLAS towers that received the signal, the tag number, and the numeric time, in milliseconds from 1970-01-01.

moving_window

The size of the moving window for the running median calculation.

nbs_min

The minimum number of base stations (ATLAS towers) that received tag signal.

sd_threshold

A threshold value above which rows are removed.

filter_speed

Logical specifiying whether to use the speed filter or not.

speed_cutoff

The maximum speed in kilometres per hour allowed in the raw data. Points with straight line displacement speeds calculated as above this are removed.

Value

A datatable class object (extends data.frame) which has the additional columns posID and ts, which is TIME converted to human readable POSIXct format.