R/add_movement_functions.R
add_rot.Rd
Takes a movement or eye tracker data frame, and adds rotation matrices from orientation data. For gaze data, rotation is computed wrt a reference vector, usually forward gaze.
add_rot(df, direction = c(0, 0, 1))
Movement or eye tracker or combined/resampled data frame. Expects either columns `rot_x`, `rot_y`, `rot_z`, or columns `gaze_direction_x`, `gaze_direction_y`, `gaze_direction_z`
Reference gaze direction. A single vector. Default: forward
Same df with rotation matrices added