Guess the time at which escape movement ends, depending on trial outcome: Survived, killed: end of recording minus buffer and fade time Escaped to safe house: crossing of the safe house threshold Assumes safe house size 1 m x 1 m x 2 m (height) Does not check whether people came through the door (only distance to safe house centre is considered) If escaped but no safe house position logged, or entry to safe house unclear (edge cases): end of recording minus 0.5 s (as a rough guess)
guess_escape_end_time(
safe_pos,
max_time = max(ref_movement$time),
end_state,
ref_movement
)
Safe position (output from find_safe_position)
Maximum time to look for end of escape. Should usually be the time point at which the visual display for the participant ended (i.e., not the end of movement tracking or end time of the trial) This usually the end time, minus a buffer time (often 1.5 s) and the fade time (often 0.05 s)
End state column entry
Reference movement (e.g. waist movement)