Recompute trajectory-specific velocities
get_traj_velocities(
obj_name,
time_col = "time_sec",
length_col = "position_length",
width_col = "position_width",
height_col = "position_height",
set_init_vel_zero = FALSE,
velocity_min = NA,
velocity_max = NA
)
If add_to_viewr
is TRUE
, additional columns are
appended to the input viewr object. If FALSE
, a standalone tibble is
created. Either way, an "instantaneous" velocity is computed as the
difference in position divided by the difference in time as each successive
row is encountered. Additionally, velocities along each of the three
position axes are computed and provided as additional columns.
The input viewr object; a tibble or data.frame with attribute
pathviewr_steps
that includes "viewr"
Name of the column containing time
Name of the column containing length dimension
Name of the column containing width dimension
Name of the column containing height dimension
Should the first value be zero or can it be a duplicate of the second velocity value? Defaults to FALSE.
Should data below a certain velocity be filtered out of the object? If so, enter a numeric. If not, keep NA.
Should data above a certain velocity be filtered out of the object? If so, enter a numeric. If not, keep NA.
Vikram B. Baliga
Instantaneous velocity is not truly "instantaneous" but rather is approximated as the change in distance divided by change in time from one observation (row) to the previous observation (row). Each component of velocity is computed (i.e. per axis) along with the overall velocity of the subject.
Other mathematical functions:
calc_min_dist_v()
,
deg_2_rad()
,
find_curve_elbow()
,
get_2d_angle()
,
get_3d_angle()
,
get_3d_cross_prod()
,
get_dist_point_line()
,
get_velocity()
,
rad_2_deg()