diff --git a/eive_tmtc/tmtc/acs/star_tracker.py b/eive_tmtc/tmtc/acs/star_tracker.py index cafa2e2..162bd05 100644 --- a/eive_tmtc/tmtc/acs/star_tracker.py +++ b/eive_tmtc/tmtc/acs/star_tracker.py @@ -12,14 +12,13 @@ import struct from eive_tmtc.config.definitions import CustomServiceList from eive_tmtc.pus_tm.defs import PrintWrapper +from eive_tmtc.utility.input_helper import InputHelper from spacepackets.ecss.tc import PusTelecommand from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config.tmtc import tmtc_definitions_provider -from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode - from tmtccmd.tc import DefaultPusQueueHelper +from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode from tmtccmd.util import ObjectIdU32 -from eive_tmtc.utility.input_helper import InputHelper from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter _LOGGER = logging.getLogger(__name__) @@ -734,13 +733,22 @@ def handle_solution_set(hk_data: bytes, pw: PrintWrapper): # Result of LISA: Lost in space algorithm lisa_fmt = "!fffffB" fmt_len = struct.calcsize(track_fmt) - (lisa_q_w, lisa_q_x, lisa_q_y, lisa_q_z) = struct.unpack( - lisa_fmt, hk_data[current_idx : current_idx + fmt_len] - ) + ( + 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]) pw.dlog(f"LISA QW: {lisa_q_w}") pw.dlog(f"LISA QX: {lisa_q_x}") pw.dlog(f"LISA QY: {lisa_q_y}") pw.dlog(f"LISA QZ: {lisa_q_z}") + pw.dlog( + f"Percentage of close stars in LISA solution: {lisa_percentage_close_stars}" + ) + pw.dlog(f"Number of close stars in LISA solution: {lisa_number_close_stars}") current_idx += fmt_len is_trusworthy = hk_data[current_idx] pw.dlog(f"Trustworthy solution: {is_trusworthy}")