fn find_closest_index(trajectory: &[(i64, &[f32])], target: i64) -> usize
Find index of the closest point to a target timestamp.