Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
adokter committed Oct 20, 2021
1 parent 457d435 commit a592ee2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/integrate_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ integrate_profile.vp <- function(x, alt_min = 0, alt_max = Inf, alpha = NA,
output$airspeed_u <- weighted.mean(airspeed_u, weight_densdh, na.rm = TRUE)
output$airspeed_v <- weighted.mean(airspeed_u, weight_densdh, na.rm = TRUE)
output$ff_wind <- weighted.mean(sqrt(u_wind^2 + v_wind^2), weight_densdh, na.rm = TRUE)
output$dd_wind <- weighted.mean((pi / 2 - atan2(v_wind, u_wind)) * 180 / pi, weight_densdh, na.rm = TRUE)
output$u_wind <- weighted.mean(u_wind, weight_densdh, na.rm = TRUE)
output$v_wind <- weighted.mean(v_wind, weight_densdh, na.rm = TRUE)
}

class(output) <- c("vpi", "data.frame")
Expand Down Expand Up @@ -372,8 +373,9 @@ integrate_profile.vpts <- function(x, alt_min = 0, alt_max = Inf,
output$heading <- colSums(((pi / 2 - atan2(airspeed_v, airspeed_u)) * 180 / pi) * weight_densdh, na.rm = TRUE)
output$airspeed_u <- colSums(airspeed_u * weight_densdh, na.rm = TRUE)
output$airspeed_v <- colSums(airspeed_v * weight_densdh, na.rm = TRUE)
output$ff_wind <- colSums(sqrt(u_wind^2 + v_wind^2) * weight_densdh, na.rm = TRUE)
output$dd_wind <- colSums(((pi / 2 - atan2(v_wind, u_wind)) * 180 / pi) * weight_densdh, na.rm = TRUE)
output$ff_wind <- colSums(sqrt(get_quantity(x,"u_wind")^2 + get_quantity(x,"v_wind")^2) * weight_densdh, na.rm = TRUE)
output$u_wind <- colSums(get_quantity(x,"u_wind") * weight_densdh, na.rm = TRUE)
output$v_wind <- colSums(get_quantity(x,"v_wind") * weight_densdh, na.rm = TRUE)
}

class(output) <- c("vpi", "data.frame")
Expand Down

0 comments on commit a592ee2

Please sign in to comment.