From 904378afee37b48436958fbbfbd40122074c208c Mon Sep 17 00:00:00 2001 From: Balduin Date: Tue, 24 Nov 2026 16:18:57 +0100 Subject: [PATCH] test(tecs): skip case with zero error entirely --- src/lib/tecs/TECSControlClosedLoopTest.cpp | 4 ++++ src/lib/tecs/plot_closed_loop.py | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/tecs/TECSControlClosedLoopTest.cpp b/src/lib/tecs/TECSControlClosedLoopTest.cpp index b7c05dc10df..77ff66e815b 100644 --- a/src/lib/tecs/TECSControlClosedLoopTest.cpp +++ b/src/lib/tecs/TECSControlClosedLoopTest.cpp @@ -645,6 +645,10 @@ TEST_F(TECSControlClosedLoopTest, EnergyErrorPhasePortrait) for (int ske_sign = -1; ske_sign <= 1; ske_sign++) { for (int spe_sign = -1; spe_sign <= 1; spe_sign++) { + + // All zero case, not interesting + if (!ske_sign && !spe_sign) { continue; } + const float ske_error = ske_sign * ENERGY_ERROR; const float spe_error = spe_sign * ENERGY_ERROR; diff --git a/src/lib/tecs/plot_closed_loop.py b/src/lib/tecs/plot_closed_loop.py index da99603c140..d88bff27e22 100755 --- a/src/lib/tecs/plot_closed_loop.py +++ b/src/lib/tecs/plot_closed_loop.py @@ -165,9 +165,6 @@ def plot_phase(d, title): e_spe = G * (d["alt_sp"][m] - d["h"][m]) key = (int(np.sign(np.round(e_ske[0], 3))), int(np.sign(np.round(e_spe[0], 3)))) - if key not in PHASE_CASES: - continue # zero initial error: nothing to draw - label, c = PHASE_CASES[key] ax.plot(e_ske, e_spe, color=c, lw=2) ax.plot(e_ske[0], e_spe[0], "o", color=c, ms=9)