View source: R/jump_functions.R
add_phases_jump | R Documentation |
add_phases_jump
uses average hip joint-center height and supplied events to divide a jump into 11 phases.
This division is useful for further analyis of the individual phases in the jump.
add_phases_jump(.data)
.data |
A tibble containing motioncapture data from a jump. The data must contain:
|
Three phase columns are generated phase_l, phase_r, phase_b
, describing the phases of the left leg, right leg, and both extremities respectively.
The numerical values in phase
column correspond to:
Descending phase of the preparation
The deepest postion in the preparation phase (A single frame)
The ascending phase of the preparation (push-off)
Toe off - the last fase with contact between the feet and the ground (A single frame)
The ascending phase of the hang time
The highest position of the hang time (A single frame)
The descending phase of the hang time
Impact (A single frame)
Descending phase of the landing.
Deepest position of the landing (A single frame)
Ascending phase of the landing.
The values in the column phase_b
will be identical to the values in phase_l
and phase_r
if the subject is taking off
and landing simultaneously with both extremities. If this is not the case phase_b
will take the value 4
at the frame where
the last foot has contact with the ground, and the value 8
at the frame where the last foot has impact. NA
values will be given to phases
where there is transition (e.g. left foot still has contact with ground, while right foot is in the air.)
The tibble supplied in the .data argument
, with the added columns phase_l
, phase_r
, phase_b
,
events_l
, events_r
, events_b
# With synthetic data
df <- tibble::tibble(
frame = c(1:11),
marks = c( NA, NA, NA,"TOB", NA, NA, NA, "FFB", NA, NA, NA),
LHY = c(100, 50, 75, 100, 125, 150, 125, 100, 75, 50, 100),
RHY = c(100, 50, 75, 100, 125, 150, 125, 100, 75, 50, 100))
df2 <- tibble::tibble(
frame = c(1:15),
marks = c( NA, NA, NA, "TOL", "TOR", NA, NA, NA, NA, "FFL", "FFR", NA, NA, NA, NA),
LHY = c(100, 50, 50, 75, 100, 125, 150, 150, 125, 100, 75, 70, 50, 50, 100),
RHY = c(100, 50, 50, 75, 100, 125, 150, 150, 125, 100, 75, 70, 50, 50, 100))
add_phases_jump(df)
add_phases_jump(df2)
# With real mocap data
df3 <- dplyr::filter(mocapr::mocapr_data, movement_nr == 1)
df3 <- dplyr::select(df, frame, marks, LHY, RHY)
add_phases_jump(df3)
# A plot displaying the phases
df4 <- dplyr::filter(mocapr::mocapr_data, movement_nr == 1)
df4 <- add_phases_jump(df4)
mocapr::animate_global(df4,
planes = "X",
remove_facet_labels = FALSE,
return_plot = TRUE,
col_facets = phase_b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.