improvement for syrlinks code
This commit is contained in:
parent
4b5c4fecc7
commit
f6fcb2fb28
@ -15,6 +15,10 @@ list yields a list of all related PRs for each release.
|
|||||||
- COM `Submode` enum moved from subsystem module to separate definitions module and renamed
|
- COM `Submode` enum moved from subsystem module to separate definitions module and renamed
|
||||||
to `Mode`. Added re-imports with the name `ComMode` in the subsystem and syrlinks module.
|
to `Mode`. Added re-imports with the name `ComMode` in the subsystem and syrlinks module.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Eb to N0 calculation: Improve robustness against division by zero.
|
||||||
|
|
||||||
# [v2.19.4] 2023-03-24
|
# [v2.19.4] 2023-03-24
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
@ -304,7 +304,11 @@ def handle_syrlinks_rx_registers_dataset(printer: FsfwTmTcPrinter, hk_data: byte
|
|||||||
rx_agc = rx_agc_value & 0xFFF
|
rx_agc = rx_agc_value & 0xFFF
|
||||||
rx_demod_eb = struct.unpack("!I", hk_data[13:17])[0] & 0xFFFFFF
|
rx_demod_eb = struct.unpack("!I", hk_data[13:17])[0] & 0xFFFFFF
|
||||||
rx_demod_n0 = struct.unpack("!I", hk_data[17:21])[0] & 0xFFFFFF
|
rx_demod_n0 = struct.unpack("!I", hk_data[17:21])[0] & 0xFFFFFF
|
||||||
eb_to_n0 = 20 * math.log10(rx_demod_eb / rx_demod_n0) - 3
|
if rx_demod_n0 > 0:
|
||||||
|
eb_to_n0 = 20 * math.log10(rx_demod_eb / rx_demod_n0) - 3
|
||||||
|
else:
|
||||||
|
logging.getLogger(__name__).warning("RX Demod N0 is 0, can not calculate Eb to N0")
|
||||||
|
eb_to_n0 = 0
|
||||||
rx_data_rate_raw = hk_data[21]
|
rx_data_rate_raw = hk_data[21]
|
||||||
rx_data_rate = -1
|
rx_data_rate = -1
|
||||||
if rx_data_rate_raw == 0:
|
if rx_data_rate_raw == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user