Takes a movement or eye tracker data frame, derives rotation matrices from orientation data, and adds the gaze elevation over the horizontal (x-z) plane.

add_gaze_elevation(df, direction = c(0, 0, 1))

Arguments

df

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

direction

Reference gaze vector direction (default: forward)

Value

Original data frame with column gaze_elevation in degrees added.