fixed star tracker bug

This commit is contained in:
Julia Zink 2023-03-13 10:52:31 +01:00
parent a5cc03d8a0
commit e3e74c3f20
1 changed files with 2 additions and 2 deletions

View File

@ -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]