added missing str parameters #162
@ -693,7 +693,7 @@ def handle_solution_set(hk_data: bytes, pw: PrintWrapper):
|
|||||||
current_idx = 0
|
current_idx = 0
|
||||||
fmt_len = struct.calcsize(ticks_time_fmt)
|
fmt_len = struct.calcsize(ticks_time_fmt)
|
||||||
(ticks, unix_time) = struct.unpack(
|
(ticks, unix_time) = struct.unpack(
|
||||||
ticks_time_fmt, hk_data[current_idx: current_idx + fmt_len]
|
ticks_time_fmt, hk_data[current_idx : current_idx + fmt_len]
|
||||||
)
|
)
|
||||||
unix_as_dt = datetime.datetime.fromtimestamp(unix_time, tz=datetime.timezone.utc)
|
unix_as_dt = datetime.datetime.fromtimestamp(unix_time, tz=datetime.timezone.utc)
|
||||||
pw.dlog(f"Ticks: {ticks} | UNIX time: {unix_time}")
|
pw.dlog(f"Ticks: {ticks} | UNIX time: {unix_time}")
|
||||||
@ -702,7 +702,7 @@ def handle_solution_set(hk_data: bytes, pw: PrintWrapper):
|
|||||||
calib_quaternions_fmt = "!ffff"
|
calib_quaternions_fmt = "!ffff"
|
||||||
fmt_len = struct.calcsize(calib_quaternions_fmt)
|
fmt_len = struct.calcsize(calib_quaternions_fmt)
|
||||||
(calib_q_w, calib_q_x, calib_q_y, calib_q_z) = struct.unpack(
|
(calib_q_w, calib_q_x, calib_q_y, calib_q_z) = struct.unpack(
|
||||||
calib_quaternions_fmt, hk_data[current_idx: current_idx + fmt_len]
|
calib_quaternions_fmt, hk_data[current_idx : current_idx + fmt_len]
|
||||||
)
|
)
|
||||||
pw.dlog("Calibrated Quaternions")
|
pw.dlog("Calibrated Quaternions")
|
||||||
pw.dlog(f"Quaternion w: {calib_q_w}")
|
pw.dlog(f"Quaternion w: {calib_q_w}")
|
||||||
@ -713,7 +713,7 @@ def handle_solution_set(hk_data: bytes, pw: PrintWrapper):
|
|||||||
track_fmt = "!fffff"
|
track_fmt = "!fffff"
|
||||||
fmt_len = struct.calcsize(track_fmt)
|
fmt_len = struct.calcsize(track_fmt)
|
||||||
(track_confidence, track_q_w, track_q_x, track_q_y, track_q_z) = struct.unpack(
|
(track_confidence, track_q_w, track_q_x, track_q_y, track_q_z) = struct.unpack(
|
||||||
track_fmt, hk_data[current_idx: current_idx + fmt_len]
|
track_fmt, hk_data[current_idx : current_idx + fmt_len]
|
||||||
)
|
)
|
||||||
pw.dlog(f"Track Confidence: {track_confidence}")
|
pw.dlog(f"Track Confidence: {track_confidence}")
|
||||||
pw.dlog(f"Track QW: {track_q_w}")
|
pw.dlog(f"Track QW: {track_q_w}")
|
||||||
@ -733,20 +733,27 @@ def handle_solution_set(hk_data: bytes, pw: PrintWrapper):
|
|||||||
# Result of LISA: Lost in space algorithm
|
# Result of LISA: Lost in space algorithm
|
||||||
lisa_fmt = "!fffffB"
|
lisa_fmt = "!fffffB"
|
||||||
fmt_len = struct.calcsize(track_fmt)
|
fmt_len = struct.calcsize(track_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]
|
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 QW: {lisa_q_w}")
|
||||||
pw.dlog(f"LISA QX: {lisa_q_x}")
|
pw.dlog(f"LISA QX: {lisa_q_x}")
|
||||||
pw.dlog(f"LISA QY: {lisa_q_y}")
|
pw.dlog(f"LISA QY: {lisa_q_y}")
|
||||||
pw.dlog(f"LISA QZ: {lisa_q_z}")
|
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"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}")
|
pw.dlog(f"Number of close stars in LISA solution: {lisa_number_close_stars}")
|
||||||
current_idx += fmt_len
|
current_idx += fmt_len
|
||||||
is_trusworthy = hk_data[current_idx]
|
is_trusworthy = hk_data[current_idx]
|
||||||
pw.dlog(f"Trustworthy solution: {is_trusworthy}")
|
pw.dlog(f"Trustworthy solution: {is_trusworthy}")
|
||||||
current_idx += 1
|
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])
|
||||||
pw.dlog(f"Stable count: {stable_count}")
|
pw.dlog(f"Stable count: {stable_count}")
|
||||||
current_idx += 4
|
current_idx += 4
|
||||||
solution_strategy = hk_data[current_idx]
|
solution_strategy = hk_data[current_idx]
|
||||||
|
Loading…
Reference in New Issue
Block a user