Guess (by interpolation) the time that two movement data frames were, for the first time, closer to (method "min") or further away than (method "max") a distance threshold

guess_time_at_dist2(
  df1,
  df2,
  dist,
  min_time = min(c(df1$time, df2$time)),
  max_time = max(c(df1$time, df2$time)),
  method = "min",
  samplingrate = 10
)

Arguments

df1

A dataframe of movement (must contain standard trajectory columns, i.e. "time", "pos_x", "pos_y", "pos_z").

df2

A dataframe of movement (must contain standard trajectory columns, i.e. "time", "pos_x", "pos_y", "pos_z").

min_time

Minimum time within the resampled movement (taken from "time" column) to search.

max_time

Maximum time within the resampled movement (taken from "time" column) to search.

method

whether to extract the first time distance is smaller ("min", default) or larger than ("max") the threshold

samplingrate

resampling rate

Value

A scalar time