R/add_movement_functions.R
add_orientation2target2.Rd
Returns the reference data frame with cos(angle) and angle over time added.
add_orientation2target2(
ref_movement,
target_movement,
join_by = "time",
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.
Movement of point of interest (e.g threat movement)
= "time" Column by which to join the two data frames (character)
= FALSE
`ref_movement` with columns `time`, `target_diff` (raw angle relative to target) and `target_ratio` (cosine of angle) added