Remove reflections, or prolonged spikes from a movement track by identifying the bounds and removing positions between them. The important function arguments here are point_angle_cutoff ($A$), reflection_speed_cutoff ($S$). If the prolonged spike ends before the last row of data, the true end point is used as the outer bound of the spike. If the prolonged spike does not end within the last row of data, all the data are retained and a message is printed.

atl_remove_reflections(
  data,
  x = "x",
  y = "y",
  time = "time",
  point_angle_cutoff = 45,
  reflection_speed_cutoff = 20
)

Arguments

data

A dataframe or similar which has previously been cleaned.

x

The name of the X coordinate column.

y

The name of the Y coordinate column.

time

The name of the timestamp column.

point_angle_cutoff

The turning angle (in degrees) above which high instantaneous speeds are considered an anomaly rather than fast transit.

reflection_speed_cutoff

The speed (in m/s) above which an anomaly is detected when combined with a high turning angle.

Value

A dataframe with reflections removed.

Author

Pratik R. Gupte

Examples

if (FALSE) {
filtered_data <- atl_remove_reflections(
  data = track_data,
  x = "x", y = "y", time = "time",
  point_angle_cutoff = A,
  reflection_speed_cutoff = S
)
}