R/add_movement_functions.R
add_orientation2target.Rd
Returns the same data frame with added cos(angle) and angle over time.
add_orientation2target(
ref_movement,
target_position,
relative_to_first = FALSE
)
A data frame with reference movement, e.g. the head or the waist movement. Movement file should have `pos_x`, `pos_y`, `pos_z`, `rot_x`, `rot_y`, `rot_z` columns.
A list containing `pos_x` `pos_y` `pos_z` target position
= FALSE
`rev_movement` with new columns `target_diff` (raw angle relative to target) and `target_ratio` (cosine of angle)