changed clip range for snr to -128/128 instead of 0/255

This possibly fixes the SNR problem, but needs to be tested carefully as we had a reason for using np.clip()
This commit is contained in:
dj2ls 2022-05-20 09:26:01 +02:00
parent 5317c8081a
commit 0db0fcc27e

View file

@ -620,8 +620,8 @@ class RF():
snr = round(modem_stats_snr, 1)
structlog.get_logger("structlog").info("[MDM] calculate_snr: ", snr=snr)
# print(snr)
static.SNR = np.clip(snr, 0, 255) # limit to max value of 255
# static.SNR = np.clip(snr, 0, 255) # limit to max value of 255
static.SNR = np.clip(snr, -128, 128) # limit to max value of -128/128 as a possible fix of #188
return static.SNR
except Exception as e:
structlog.get_logger("structlog").error(f"[MDM] calculate_snr: Exception: {e}")