Add column with distance to moving target

add_dist2(df1, df2, 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").

samplingrate

resampling rate

#' NOTE: because sampling times can differ between data frames, data are resampled at default rate of 10 Hz, and to avoid an impact of tracker glitches they are median-smoothed over 3 data points (300 ms), using the function combine_movement()

Value

the resampled data frame with column distance added