Skip to content

Commit 3688c56

Browse files
committed
Metrics checks adjusted for design_lon and design_lat
1 parent 6b00f1e commit 3688c56

File tree

7 files changed

+10
-5
lines changed

7 files changed

+10
-5
lines changed

docs/src/showcase/ex01/ex01.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,4 +321,9 @@ Sim.init!(sim, init_air)
321321

322322
Feel free to explore the remaining control modes and the altitude guidance function on your own. For
323323
more information on ```Cessna172Xv1```'s flight controller, check out the [source
324-
code](https://github.com/e271828e/Flight.jl/blob/master/src/aircraft/c172/c172x/control/c172x_ctl.jl).
324+
code](https://github.com/e271828e/Flight.jl/blob/master/src/aircraft/c172/c172x/control/c172x_ctl.jl)
325+
and the design notebooks for the
326+
[longitudinal](https://github.com/e271828e/Flight.jl/blob/master/src/aircraft/c172/c172x/control/design/c172x_lon.ipynb)
327+
and
328+
[lateral](https://github.com/e271828e/Flight.jl/blob/master/src/aircraft/c172/c172x/control/design/c172x_lat.ipynb)
329+
control channels.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

src/aircraft/c172/c172x/control/design/c172x_design.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ function design_lon(; design_point::C172.TrimParameters = C172.TrimParameters(),
201201
q2e_results = optimize_PID(P_q2e_opt; params_0, settings, weights, global_search)
202202

203203
params_q2e = q2e_results.params
204-
if !check_results(q2e_results, Metrics(; Ms = 1.3, ∫e = 0.2, ef = 0.02, ∫u = Inf, up = Inf))
204+
if !check_results(q2e_results, Metrics(; Ms = 1.6, ∫e = 0.3, ef = 0.03, ∫u = Inf, up = Inf))
205205
@warn("Checks failed for pitch rate PID, design point $(design_point), final metrics $(q2e_results.metrics)")
206206
end
207207

@@ -245,7 +245,7 @@ function design_lon(; design_point::C172.TrimParameters = C172.TrimParameters(),
245245
v2θ_results = optimize_PID(P_θ2v_opt; params_0, settings, weights, global_search)
246246

247247
params_v2θ = v2θ_results.params
248-
if !check_results(v2θ_results, Metrics(; Ms = 1.3, ∫e = 0.2, ef = 0.02, ∫u = Inf, up = Inf))
248+
if !check_results(v2θ_results, Metrics(; Ms = 1.6, ∫e = 0.3, ef = 0.03, ∫u = Inf, up = Inf))
249249
@warn("Checks failed for EAS to θ PID, design point $(design_point), final metrics $(v2θ_results.metrics)")
250250
end
251251

@@ -275,7 +275,7 @@ function design_lon(; design_point::C172.TrimParameters = C172.TrimParameters(),
275275
v2t_results = optimize_PID(P_t2v; params_0, settings, weights, global_search)
276276

277277
params_v2t = v2t_results.params
278-
if !check_results(v2t_results, Metrics(; Ms = 1.3, ∫e = 0.2, ef = 0.02, ∫u = Inf, up = Inf))
278+
if !check_results(v2t_results, Metrics(; Ms = 1.6, ∫e = 0.3, ef = 0.03, ∫u = Inf, up = Inf))
279279
@warn("Checks failed for EAS to throttle PID, design point $(design_point), final metrics $(v2t_results.metrics)")
280280
end
281281

@@ -305,7 +305,7 @@ function design_lon(; design_point::C172.TrimParameters = C172.TrimParameters(),
305305
c2θ_results = optimize_PID(P_θ2c; params_0, settings, weights, global_search)
306306

307307
params_c2θ = c2θ_results.params
308-
if !check_results(c2θ_results, Metrics(; Ms = 1.3, ∫e = 0.2, ef = 0.02, ∫u = Inf, up = Inf))
308+
if !check_results(c2θ_results, Metrics(; Ms = 1.6, ∫e = 0.3, ef = 0.03, ∫u = Inf, up = Inf))
309309
@warn("Checks failed for climb rate to θ PID, design point $(design_point), final metrics $(c2θ_results.metrics)")
310310
end
311311

0 commit comments

Comments
 (0)