add_phases_jump: Divide a jump into phases

View source: R/jump_functions.R

add_phases_jumpR Documentation

Divide a jump into phases

Description

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.

Usage

add_phases_jump(.data)

Arguments

.data

A tibble containing motioncapture data from a jump. The data must contain:

  • LHY and RHY columns containg global spatial joint-center positions of the left and right hip

  • A frame column

  • A marks column with values descring toe off events (TOL = toe off of left foot, TOR = toe off of right foot, TOB = toe off from both feet), and impact events (FFL = flat foot contact with left foot, FFR = flat foot contact with right foot, FFB = flat foot contact with both feet).

Details

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:

  1. Descending phase of the preparation

  2. The deepest postion in the preparation phase (A single frame)

  3. The ascending phase of the preparation (push-off)

  4. Toe off - the last fase with contact between the feet and the ground (A single frame)

  5. The ascending phase of the hang time

  6. The highest position of the hang time (A single frame)

  7. The descending phase of the hang time

  8. Impact (A single frame)

  9. Descending phase of the landing.

  10. Deepest position of the landing (A single frame)

  11. 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.)

Value

The tibble supplied in the .data argument, with the added columns phase_l, phase_r, phase_b, events_l, events_r, events_b

Examples

# 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)

steenharsted/mocapr documentation built on Feb. 1, 2024, 1:49 p.m.