From e789bdcf7dd81574ec48f45c7117b99701888f87 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Thu, 21 Mar 2024 19:08:58 +0100 Subject: [PATCH] less constants --- examples/tune_1p.jl | 11 +++++------ examples/tune_4p.jl | 10 +++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/examples/tune_1p.jl b/examples/tune_1p.jl index b95c8036..47b1c084 100644 --- a/examples/tune_1p.jl +++ b/examples/tune_1p.jl @@ -9,15 +9,14 @@ se().abs_tol=0.0000006 se().rel_tol=0.000001 using KiteControllers, KiteModels, Plots, BayesOpt -# using Memoize if ! @isdefined kcu; const kcu = KCU(se()); end if ! @isdefined kps; const kps = KPS3(kcu); end -wcs = WCSettings(); wcs.dt = 1/se().sample_freq -fcs = FPCSettings(); fcs.dt = wcs.dt -fpps = FPPSettings() -const ssc = SystemStateControl(wcs, fcs, fpps) -dt = wcs.dt +wcs::WCSettings = WCSettings(); wcs.dt = 1/se().sample_freq +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=60; end diff --git a/examples/tune_4p.jl b/examples/tune_4p.jl index fe1196f9..8d2d6203 100644 --- a/examples/tune_4p.jl +++ b/examples/tune_4p.jl @@ -12,11 +12,11 @@ using KiteControllers, KiteModels, Plots, BayesOpt if ! @isdefined kcu; const kcu = KCU(se()); end if ! @isdefined kps; const kps = KPS4(kcu); end -wcs = WCSettings(); wcs.dt = 1/se().sample_freq -fcs = FPCSettings(); fcs.dt = wcs.dt -fpps = FPPSettings() -const ssc = SystemStateControl(wcs, fcs, fpps) -dt = wcs.dt +wcs::WCSettings = WCSettings(); wcs.dt = 1/se().sample_freq +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=60; end