Skip to content

Commit

Permalink
add est_chi_dat
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Jun 17, 2024
1 parent 62130d5 commit 8b0296f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/flightpathcontroller.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ docs/flight_path_controller_III.png
chi_factor = 0
"angular velocity of the kite in degrees/s"
omega = 0
"estimated turn rate"
"estimated turn rate (heading)"
est_psi_dot = 0
"estimated turn rate (course)"
est_chi_dot = 0
"desired flight direction (bearing)"
chi_set = 0
"minimal value of the depower setting, needed for the fully powered kite"
Expand Down Expand Up @@ -167,6 +169,13 @@ function on_est_sysstate(fpc::FlightPathController, phi, beta, psi, chi, omega,
delta -= 2π
fpc.est_psi_dot = delta / fpc.fcs.dt
end
delta1 = chi - fpc.chi
if delta1 < -pi
delta1 += 2π
elseif delta1 > π
delta1 -= 2π
fpc.est_chi_dot = delta1 / fpc.fcs.dt
end
end
fpc.psi = psi
# Eq. 6.4: calculate the normalized depower setting
Expand Down

0 comments on commit 8b0296f

Please sign in to comment.