From 7e2ea08277148873cfa541a872b5cc52bf06ee5e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 18 Aug 2022 18:15:48 +0200 Subject: [PATCH] correctly parse isis mgm values --- deps/spacepackets | 2 +- deps/tmtccmd | 2 +- tmtc/acs_ctrl.py | 9 ++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/deps/spacepackets b/deps/spacepackets index 9464d53..ac1d14e 160000 --- a/deps/spacepackets +++ b/deps/spacepackets @@ -1 +1 @@ -Subproject commit 9464d5340d43072339105f80501d44244501e25d +Subproject commit ac1d14ebf64fb6479e7c6cf26907bbf9e56d239e diff --git a/deps/tmtccmd b/deps/tmtccmd index 7d50d4b..e3343ef 160000 --- a/deps/tmtccmd +++ b/deps/tmtccmd @@ -1 +1 @@ -Subproject commit 7d50d4b7c4ce99599f10619b4ef1f9aa1fb2a415 +Subproject commit e3343ef96a75974239608ae9246804ff9273e3d9 diff --git a/tmtc/acs_ctrl.py b/tmtc/acs_ctrl.py index 6a7f900..71cc1ba 100644 --- a/tmtc/acs_ctrl.py +++ b/tmtc/acs_ctrl.py @@ -109,13 +109,8 @@ def handle_acs_ctrl_mgm_data(printer: FsfwTmTcPrinter, hk_data: bytes): mgm_1_rm3100_floats_ut, current_idx = unpack_float_tuple(current_idx) mgm_2_lis3_floats_ut, current_idx = unpack_float_tuple(current_idx) mgm_3_rm3100_floats_ut, current_idx = unpack_float_tuple(current_idx) - i32_tuple_fmt = "!iii" - imtq_mgm_nt = struct.unpack( - i32_tuple_fmt, - hk_data[current_idx : current_idx + struct.calcsize(i32_tuple_fmt)], - ) - imtq_mgm_ut = tuple(val / 1000.0 for val in imtq_mgm_nt) - current_idx += struct.calcsize(i32_tuple_fmt) + isis_floats_nt, current_idx = unpack_float_tuple(current_idx) + imtq_mgm_ut = tuple(val / 1000.0 for val in isis_floats_nt) pw.dlog("ACS CTRL HK: MGM values [X,Y,Z] in floating point uT: ") mgm_lists = [ mgm_0_lis3_floats_ut,