diff --git a/eive_tmtc/tmtc/acs/acs_ctrl.py b/eive_tmtc/tmtc/acs/acs_ctrl.py index 0fa6c5e..be8ad18 100644 --- a/eive_tmtc/tmtc/acs/acs_ctrl.py +++ b/eive_tmtc/tmtc/acs/acs_ctrl.py @@ -732,8 +732,10 @@ def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes): pw.dlog("Received CTRL Values Set") fmt_quat = "!dddd" fmt_scalar = "!d" + fmt_vec = "!ddd" inc_len_quat = struct.calcsize(fmt_quat) inc_len_scalar = struct.calcsize(fmt_scalar) + inc_len_vec = struct.calcsize(fmt_vec) if len(hk_data) < 2 * inc_len_quat + inc_len_scalar: pw.dlog("Received HK set too small") return @@ -759,10 +761,18 @@ def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes): ) ] current_idx += inc_len_scalar + tgt_rot = [ + f"{val:8.3f}" + for val in struct.unpack( + fmt_vec, hk_data[current_idx : current_idx + inc_len_vec] + ) + ] + current_idx += inc_len_vec pw.dlog(f"Control Values Target Quaternion: {tgt_quat}") pw.dlog(f"Control Values Error Quaternion: {err_quat}") pw.dlog(f"Control Values Error Angle: {err_ang} [rad]") - pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=3) + pw.dlog(f"Control Values Target Rotational Rate: {tgt_rot} [rad/s]") + pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=4) def handle_act_cmd_data(pw: PrintWrapper, hk_data: bytes):