From e3e74c3f203810e75bf894ad130e66b9aa48b810 Mon Sep 17 00:00:00 2001 From: Julia Zink Date: Mon, 13 Mar 2023 10:52:31 +0100 Subject: [PATCH] fixed star tracker bug --- eive_tmtc/tmtc/acs/star_tracker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eive_tmtc/tmtc/acs/star_tracker.py b/eive_tmtc/tmtc/acs/star_tracker.py index 5b26110..bbbf3e1 100644 --- a/eive_tmtc/tmtc/acs/star_tracker.py +++ b/eive_tmtc/tmtc/acs/star_tracker.py @@ -732,7 +732,7 @@ def handle_solution_set(hk_data: bytes, pw: PrintWrapper): current_idx += 1 # Result of LISA: Lost in space algorithm lisa_fmt = "!fffffB" - fmt_len = struct.calcsize(track_fmt) + fmt_len = struct.calcsize(lisa_fmt) (lisa_q_w, lisa_q_x, lisa_q_y, lisa_q_z, lisa_percentage_close_stars, lisa_number_close_stars) = struct.unpack( lisa_fmt, hk_data[current_idx: current_idx + fmt_len] ) @@ -746,7 +746,7 @@ def handle_solution_set(hk_data: bytes, pw: PrintWrapper): is_trusworthy = hk_data[current_idx] pw.dlog(f"Trustworthy solution: {is_trusworthy}") current_idx += 1 - stable_count = struct.unpack("!I", hk_data[current_idx: current_idx + 4]) + stable_count = struct.unpack("!I", hk_data[current_idx: current_idx + 4])[0] pw.dlog(f"Stable count: {stable_count}") current_idx += 4 solution_strategy = hk_data[current_idx]