Applies a median smooth defined by a rolling window to the X and Y coordinates of the data. This function modifies in place, i.e., the results need not be assigned to a new data.table.
atl_median_smooth(data, x = "X", y = "Y", time = "TIME", moving_window = 3)
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. |
---|---|
x | The X coordinate. |
y | The Y coordinate. |
time | The timestamp, ideally as an integer. median calculation. |
moving_window | The size of the moving window for the median smooth. Must be an odd number. |
A datatable class object (extends data.frame) which has the additional columns posID and ts, which is TIME converted to human readable POSIXct format.
if (FALSE) { atl_median_smooth( data = track_data, x = "x", y = "y", time = "time", moving_window = 5 ) }