Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Oct 27, 2024
1 parent b5eee61 commit 2bba7a0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions examples/autopilot_1p.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ set = deepcopy(load_settings("system.yaml"))
kcu::KCU = KCU(set)
kps3::KPS3 = KPS3(kcu)

wcs::WCSettings = WCSettings(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)
Expand Down Expand Up @@ -53,8 +53,10 @@ function simulate(integrator)
if i > 100
dp = KiteControllers.get_depower(ssc)
if dp < 0.22 dp = 0.22 end
heading = calc_heading(kps3; neg_azimuth=true)
steering = calc_steering(ssc, 0; heading)
heading = calc_heading(kps3; neg_azimuth=true, one_point=false)
sys_state.heading = heading
sys_state.azimuth = -calc_azimuth(kps3)
steering = -calc_steering(ssc)
set_depower_steering(kps3.kcu, dp, steering)
end
if i == 200
Expand Down

0 comments on commit 2bba7a0

Please sign in to comment.