Applied polynomial linear regression model using power and x_var columns from the profile_data and returns calculated Pmax and Pmax_location in x_var

get_power_profile(
  profile_data,
  power = "mean_power",
  x_var = "mean_GRF_over_distance",
  poly_deg = 2
)

Arguments

profile_data

Data frame returned from vj_profile function

power

Character string. Name of the column in the profile_data. Default is "mean_power"

x_var

Character string. Name of the column in the profile_data. Default is "mean_GRF_over_distance"

poly_deg

Integer. Number of polynomial degrees. Forwarded to poly function. Default is 2

Value

List with calculated Pmax and Pmax_location

Examples

fv_profile <- vj_profile(mass = 75) get_power_profile(fv_profile)
#> $Pmax #> [1] 1655.637 #> #> $Pmax_rel #> [1] 22.07517 #> #> $Pmax_location #> [1] 1633.644 #>