diff --git a/data/fpc_settings.yaml b/data/fpc_settings.yaml index 88d2e7af..ecf3dd26 100644 --- a/data/fpc_settings.yaml +++ b/data/fpc_settings.yaml @@ -14,9 +14,9 @@ fpc_settings: reset_int1_to_zero: true init_opt_to_zero: false # if the root finder should start with zero - p: 1.5 # P gain of the PID controller - i: 0.1 # I gain of the PID controller - d: 13.25 # D gain of the PID controller + p: 20 # P gain of the PID controller + i: 1.2 # I gain of the PID controller + d: 10 # D gain of the PID controller gain: 0.04 # additional factor for P, I and D c1: 0.0612998898221 # was: 0.0786 c2: 1.22597628388 # was: 2.508 diff --git a/examples/minipilot.jl b/examples/minipilot.jl index ca5c596b..b9c26d90 100644 --- a/examples/minipilot.jl +++ b/examples/minipilot.jl @@ -11,9 +11,9 @@ set = deepcopy(load_settings("system.yaml")) kcu::KCU = KCU(set) kps4::KPS4 = KPS4(kcu) -wcs::WCSettings = WCSettings(dt = 1/set.sample_freq); update(wcs); wcs.dt = 1/set.sample_freq -fcs::FPCSettings = FPCSettings(dt=wcs.dt) -fpps::FPPSettings = FPPSettings() +wcs::WCSettings = WCSettings(true, dt = 1/set.sample_freq) +fcs::FPCSettings = FPCSettings(true, dt=wcs.dt) +fpps::FPPSettings = FPPSettings(true) u_d0 = 0.01 * set.depower_offset u_d = 0.01 * set.depower ssc::SystemStateControl = SystemStateControl(wcs, fcs, fpps; u_d0, u_d, v_wind=set.v_wind) @@ -21,11 +21,11 @@ dt::Float64 = wcs.dt function init_globals() global kcu, kps4, wcs, fcs, fpps, ssc - kcu = KCU(se()) + kcu = KCU(se()) kps4 = KPS4(kcu) - wcs = WCSettings(dt = 1/set.sample_freq); update(wcs); wcs.dt = 1/set.sample_freq - fcs = FPCSettings(dt=wcs.dt) - fpps = FPPSettings() + wcs = WCSettings(true, dt = 1/set.sample_freq) + fcs = FPCSettings(true, dt=wcs.dt) + fpps = FPPSettings(true) u_d0 = 0.01 * set.depower_offset u_d = 0.01 * set.depower ssc = SystemStateControl(wcs, fcs, fpps; u_d0, u_d, v_wind=set.v_wind)