ACS CTRL fix for MEKF HK handling

This commit is contained in:
Robin Müller 2023-04-01 11:48:22 +02:00
parent 5b613f98ee
commit bc85ccd8ef
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 9 additions and 1 deletions

View File

@ -10,6 +10,10 @@ list yields a list of all related PRs for each release.
# [unreleased]
## Fixed
- MEKF: Handle NOT_FINITE status (key 5)
# [v2.20.0] 2023-03-28
## Changed

View File

@ -989,6 +989,7 @@ def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
2: "NO_MODEL_VECTORS",
3: "NO_SUS_MGM_STR_DATA",
4: "COVARIANCE_INVERSION_FAILED",
5: "NOT_FINITE",
10: "INITIALIZED",
11: "RUNNING",
}
@ -1016,7 +1017,10 @@ def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
current_idx += inc_len_vec
status = struct.unpack(fmt_sts, hk_data[current_idx : current_idx + inc_len_sts])[0]
current_idx += inc_len_sts
pw.dlog(f"{'MEKF Status'.ljust(25)}: {mekf_status[status]}")
if mekf_status.get(status) is not None:
pw.dlog(f"{'MEKF Status'.ljust(25)}: {mekf_status[status]}")
else:
pw.dlog(f"{'MEKF Raw Status (key unknown)'.ljust(25)}: {status}")
pw.dlog(f"{'MEKF Quaternion'.ljust(25)}: {fmt_str_4.format(*quat)}")
pw.dlog(f"{'MEKF Rotational Rate'.ljust(25)}: {fmt_str_3.format(*rates)}")
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=3)