Skip to content

Commit 384c09a

Browse files
committed
Some progress
1 parent 3642aca commit 384c09a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/autotune.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ end
99
using WinchControllers, KiteUtils, PRIMA, ControlPlots
1010

1111
TUNED::Bool = false
12+
load_settings("system.yaml")
1213

1314
function calc_force(v_wind, v_ro)
1415
(v_wind - v_ro)^2 * 4000.0 / 16.0
@@ -26,9 +27,9 @@ end
2627

2728
function simulate(wcs::WCSettings; return_lg::Bool = false)
2829
if TUNED
29-
set = load_settings("system.yaml")
30-
else
3130
set = load_settings("system_tuned.yaml")
31+
else
32+
set = load_settings("system.yaml")
3233
end
3334

3435
# define the simulation parameters
@@ -175,11 +176,14 @@ function update_settings(wcs::WCSettings)
175176
KiteUtils.writefile(lines, "data/wc_settings_tuned.yaml")
176177
end
177178

179+
println(KiteUtils.wc_settings())
178180
wcs = autotune(wcsSpeedControl)
181+
# set = load_settings("system_tuned.yaml")
179182
if ! isnothing(wcs)
180183
copy_settings()
181184
update_settings(wcs)
182185
println()
186+
println(KiteUtils.wc_settings())
183187
wcs = autotune(wcsLowerForceLimit)
184188
if ! isnothing(wcs)
185189
update_settings(wcs)

0 commit comments

Comments
 (0)