corrected sizes and added missing validity flags
This commit is contained in:
parent
d652c4663b
commit
d294649916
@ -403,10 +403,10 @@ def handle_acs_ctrl_sus_raw_data(pw: PrintWrapper, hk_data: bytes):
|
|||||||
|
|
||||||
|
|
||||||
def handle_acs_ctrl_sus_processed_data(pw: PrintWrapper, hk_data: bytes):
|
def handle_acs_ctrl_sus_processed_data(pw: PrintWrapper, hk_data: bytes):
|
||||||
if len(hk_data) < 3 * 4 * 12:
|
if len(hk_data) < 3 * 4 * 12 + 3 * 8 * 3:
|
||||||
pw.dlog(
|
pw.dlog(
|
||||||
f"SUS Raw dataset with size {len(hk_data)} does not have expected size"
|
f"SUS Processed dataset with size {len(hk_data)} does not have expected size"
|
||||||
f" of {3 * 4 * 12} bytes"
|
f" of {3 * 4 * 12 + 3 * 8 * 3} bytes"
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
current_idx = 0
|
current_idx = 0
|
||||||
@ -437,7 +437,7 @@ def handle_acs_ctrl_sus_processed_data(pw: PrintWrapper, hk_data: bytes):
|
|||||||
sun_ijk_model = [f"{val:8.3f}" for val in {sun_ijk_model}]
|
sun_ijk_model = [f"{val:8.3f}" for val in {sun_ijk_model}]
|
||||||
current_idx += inc_len
|
current_idx += inc_len
|
||||||
pw.dlog(f"SUS ijk Model: {sun_ijk_model}")
|
pw.dlog(f"SUS ijk Model: {sun_ijk_model}")
|
||||||
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=12)
|
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=15)
|
||||||
|
|
||||||
|
|
||||||
def handle_raw_mgm_data(pw: PrintWrapper, hk_data: bytes):
|
def handle_raw_mgm_data(pw: PrintWrapper, hk_data: bytes):
|
||||||
@ -478,8 +478,8 @@ def handle_raw_mgm_data(pw: PrintWrapper, hk_data: bytes):
|
|||||||
float_str_fmt = "[{:8.3f}, {:8.3f}, {:8.3f}]"
|
float_str_fmt = "[{:8.3f}, {:8.3f}, {:8.3f}]"
|
||||||
for mgm_entry in mgm_lists[0:4]:
|
for mgm_entry in mgm_lists[0:4]:
|
||||||
formatted_list.append(float_str_fmt.format(*mgm_entry))
|
formatted_list.append(float_str_fmt.format(*mgm_entry))
|
||||||
formatted_list.append(hk_data[current_idx])
|
|
||||||
formatted_list.append(float_str_fmt.format(*mgm_lists[4]))
|
formatted_list.append(float_str_fmt.format(*mgm_lists[4]))
|
||||||
|
formatted_list.append(hk_data[current_idx])
|
||||||
print_str_list = [
|
print_str_list = [
|
||||||
"ACS Board MGM 0 LIS3MDL",
|
"ACS Board MGM 0 LIS3MDL",
|
||||||
"ACS Board MGM 1 RM3100",
|
"ACS Board MGM 1 RM3100",
|
||||||
@ -494,6 +494,7 @@ def handle_raw_mgm_data(pw: PrintWrapper, hk_data: bytes):
|
|||||||
if PERFORM_MGM_CALIBRATION:
|
if PERFORM_MGM_CALIBRATION:
|
||||||
perform_mgm_calibration(pw, mgm_0_lis3_floats_ut)
|
perform_mgm_calibration(pw, mgm_0_lis3_floats_ut)
|
||||||
assert current_idx == 61
|
assert current_idx == 61
|
||||||
|
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=6)
|
||||||
|
|
||||||
|
|
||||||
def handle_mgm_data_processed(pw: PrintWrapper, hk_data: bytes):
|
def handle_mgm_data_processed(pw: PrintWrapper, hk_data: bytes):
|
||||||
@ -588,6 +589,7 @@ def handle_gyr_data_processed(pw: PrintWrapper, hk_data: bytes):
|
|||||||
]
|
]
|
||||||
pw.dlog(f"GYR Vec Total: {gyr_vec_tot}")
|
pw.dlog(f"GYR Vec Total: {gyr_vec_tot}")
|
||||||
current_idx += inc_len
|
current_idx += inc_len
|
||||||
|
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=5)
|
||||||
|
|
||||||
|
|
||||||
def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes):
|
def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes):
|
||||||
@ -623,6 +625,7 @@ def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes):
|
|||||||
pw.dlog(f"GPS Latitude: {lat} [rad]")
|
pw.dlog(f"GPS Latitude: {lat} [rad]")
|
||||||
pw.dlog(f"GPS Longitude: {long} [rad]")
|
pw.dlog(f"GPS Longitude: {long} [rad]")
|
||||||
pw.dlog(f"GPS Velocity: {velo} [m/s]")
|
pw.dlog(f"GPS Velocity: {velo} [m/s]")
|
||||||
|
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=3)
|
||||||
|
|
||||||
|
|
||||||
def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
|
def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
|
||||||
@ -650,6 +653,7 @@ def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
|
|||||||
]
|
]
|
||||||
pw.dlog(f"MEKF Quaternion: {quat}")
|
pw.dlog(f"MEKF Quaternion: {quat}")
|
||||||
pw.dlog(f"MEKF Rotational Rate: {rate}")
|
pw.dlog(f"MEKF Rotational Rate: {rate}")
|
||||||
|
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=2)
|
||||||
|
|
||||||
|
|
||||||
def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes):
|
def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes):
|
||||||
@ -685,6 +689,7 @@ def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes):
|
|||||||
pw.dlog(f"Control Values Target Quaternion: {tgt_quat}")
|
pw.dlog(f"Control Values Target Quaternion: {tgt_quat}")
|
||||||
pw.dlog(f"Control Values Error Quaternion: {err_quat}")
|
pw.dlog(f"Control Values Error Quaternion: {err_quat}")
|
||||||
pw.dlog(f"Control Values Error Angle: {err_ang} [rad]")
|
pw.dlog(f"Control Values Error Angle: {err_ang} [rad]")
|
||||||
|
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=3)
|
||||||
|
|
||||||
|
|
||||||
def handle_act_cmd_data(pw: PrintWrapper, hk_data: bytes):
|
def handle_act_cmd_data(pw: PrintWrapper, hk_data: bytes):
|
||||||
@ -722,6 +727,7 @@ def handle_act_cmd_data(pw: PrintWrapper, hk_data: bytes):
|
|||||||
pw.dlog(f"Actuator Commands RW Target Torque: {rw_tgt_torque}")
|
pw.dlog(f"Actuator Commands RW Target Torque: {rw_tgt_torque}")
|
||||||
pw.dlog(f"Actuator Commands RW Target Speed: {rw_tgt_speed}")
|
pw.dlog(f"Actuator Commands RW Target Speed: {rw_tgt_speed}")
|
||||||
pw.dlog(f"Actuator Commands MTQ Target Dipole: {mtq_tgt_dipole}")
|
pw.dlog(f"Actuator Commands MTQ Target Dipole: {mtq_tgt_dipole}")
|
||||||
|
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=3)
|
||||||
|
|
||||||
|
|
||||||
def perform_mgm_calibration(pw: PrintWrapper, mgm_tuple: Tuple):
|
def perform_mgm_calibration(pw: PrintWrapper, mgm_tuple: Tuple):
|
||||||
|
Loading…
Reference in New Issue
Block a user