Skip to contents

Computes the magnitude of the velocity vector (Euclidean norm) at each time point for each marker/keypoint.

Usage

computeSpeed(pe, velocity_assays = NULL)

Arguments

pe

A PhysioExperiment object containing velocity assays.

velocity_assays

Character vector of velocity assay names. If NULL (default), auto-detects velocity_x/y/z or velocity_kp_x/y.

Value

PhysioExperiment with a new "speed" assay containing the scalar speed: sqrt(vx^2 + vy^2 + vz^2).

References

Winter DA (2009). "Biomechanics and Motor Control of Human Movement." 4th ed. John Wiley & Sons.

See also

computeVelocity() for computing velocity components, computeAcceleration() for computing acceleration.

Examples

demo <- demoMoCapData(seed = 1)
pe_speed <- computeSpeed(computeVelocity(demo$mocap))
SummarizedExperiment::assayNames(pe_speed)
#> [1] "position_x" "position_y" "position_z" "velocity_x" "velocity_y"
#> [6] "velocity_z" "speed"