Skip to content

Commit

Permalink
remove constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Mar 21, 2024
1 parent dc0fc97 commit 4b7b309
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/autopilot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ if ! @isdefined kcu; const kcu = KCU(se()); end
if ! @isdefined kps4; const kps4 = Model(kcu); end

wcs = WCSettings(); update(wcs); wcs.dt = 1/se().sample_freq
const fcs = FPCSettings(); fcs.dt = wcs.dt
const fpps = FPPSettings()
const ssc = SystemStateControl(wcs, fcs, fpps)
dt = wcs.dt
fcs::FPCSettings = FPCSettings(); fcs.dt = wcs.dt
fpps::FPPSettings = FPPSettings()
ssc::SystemStateControl = SystemStateControl(wcs, fcs, fpps)
dt::Float64 = wcs.dt

# the following values can be changed to match your interest
if ! @isdefined MAX_TIME; MAX_TIME=460; end
Expand All @@ -28,7 +28,7 @@ phi_set = 21.48
# on_control_command(ssc.fpp.fpca.fpc, attractor=[deg2rad(phi_set), deg2rad(51.88)])
# on_control_command(ssc.fpp.fpca.fpc, psi_dot_set=-23.763, radius=-4.35)

if ! @isdefined viewer; const viewer = Viewer3D(SHOW_KITE); end
viewer::Viewer3D = Viewer3D(SHOW_KITE)

steps = 0
if ! @isdefined T; const T = zeros(Int64(MAX_TIME/dt)); end
Expand Down

0 comments on commit 4b7b309

Please sign in to comment.