hil: LNA A/B experiment scripts, refine health railed check

This commit is contained in:
Lars Nolden
2026-09-01 08:35:08 +02:00
parent a422305059
commit 78a8635ac8
5 changed files with 267 additions and 11 deletions
+5 -2
View File
@@ -76,8 +76,11 @@ if lo is None or hi is None:
delta = hi["mean_power_db"] - lo["mean_power_db"]
reasons = []
if hi["mean_power_db"] > RAILED_DB:
reasons.append(f"railed: mean power {hi['mean_power_db']:.1f} dB > {RAILED_DB}")
# Railed only counts as a fault together with a flat spectrum: a healthy
# receiver with a strong nearby signal can legitimately show high mean power.
if hi["mean_power_db"] > RAILED_DB and hi["spectrum_span_db"] < 15.0:
reasons.append(f"railed: mean power {hi['mean_power_db']:.1f} dB > {RAILED_DB} "
f"with flat spectrum")
if hi["spectrum_span_db"] < MIN_SPAN_DB:
reasons.append(f"flat spectrum: span {hi['spectrum_span_db']:.1f} dB < {MIN_SPAN_DB}")
if delta < MIN_GAIN_DELTA_DB: