Skip to content

Commit

Permalink
minipilot and fpc_settings work fine
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Oct 27, 2024
1 parent 098fb1e commit 5526052
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions data/fpc_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions examples/minipilot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ 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)
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)
Expand Down

0 comments on commit 5526052

Please sign in to comment.