vj_simulate: Vertical Jump Simulation

Description Usage Arguments Value Examples

View source: R/simulation.R

Description

Simulates vertical jump using Runge-Kutta method

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
vj_simulate(
  mass = 75,
  weight = mass * gravity_const,
  push_off_distance = 0.4,
  gravity_const = 9.81,
  time_step = 0.001,
  save_trace = TRUE,
  fgen_func = fgen_get_output,
  iter = FALSE,
  max_iter = 1000,
  ...
)

Arguments

mass

Numeric value. Default is 75kg

weight

Numeric value. Default is mass * gravity_const

push_off_distance

Numeric value. Default is 0.4m

gravity_const

Numeric value. Default is 9.81

time_step

Numeric value. Time step used in simulation. Default is 0.001

save_trace

Logical. Default is TRUE

fgen_func

Function used to represent Force Generator. Default is fgen_get_output.

iter

Logical. Default is FALSE

max_iter

Numeric value. Default value 1000

...

Forwarded to fgen_func

Value

List object with summary data frame and trace data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
vertical_jump <- vj_simulate(
  mass = 85,
  push_off_distance = 0.4,
  time_step = 0.001
)

round(t(vertical_jump$summary), 3)

plot(
  x = vertical_jump$trace$distance,
  y = vertical_jump$trace$velocity,
  type = "l"
)

plot(
  x = vertical_jump$trace$time,
  y = vertical_jump$trace$ground_reaction_force,
  type = "l"
)

plot(
  x = vertical_jump$trace$distance,
  y = vertical_jump$trace$ground_reaction_force,
  type = "l"
)

mladenjovanovic/vjsim documentation built on Aug. 7, 2020, 10:10 p.m.