This is a convenience function used in extract_ and get_ functions that deal with two movement data frames.

combine_movement(
  df1,
  df2,
  min_time = max(c(min(df1$time), min(df2$time))),
  max_time = min(c(max(df1$time), max(df2$time))),
  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 movements (taken from "time" column) to search.

max_time

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

samplingrate

resampling rate

Value

a combined data frame with resampled position/rotation columns and filtered/resampled position/rotation columns. Columns from the input data frames are suffixed by .1 and .2, respectively

Details

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).