Merge branch 'develop' into mueller/gps-hk-parsing

This commit is contained in:
Robin Müller 2022-05-28 12:49:46 +02:00
commit 59d4096327

View File

@ -235,14 +235,21 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
if op_code in OpCodes.PCDU_FT:
key = KAI.PCDU_FT[0]
sid_list.append(make_sid(oids.P60_DOCK_HANDLER, GsSetIds.P60_CORE))
sid_list.append(make_sid(oids.PDU_1_HANDLER_ID, GsSetIds.PDU_1_CORE))
sid_list.append(make_sid(oids.PDU_2_HANDLER_ID, GsSetIds.PDU_2_CORE))
sid_list.append(make_sid(oids.ACU_HANDLER_ID, GsSetIds.ACU_CORE))
sid_list.append(make_sid(oids.P60_DOCK_HANDLER, GsSetIds.P60_AUX))
sid_list.append(make_sid(oids.PDU_1_HANDLER_ID, GsSetIds.PDU_1_AUX))
sid_list.append(make_sid(oids.PDU_2_HANDLER_ID, GsSetIds.PDU_2_AUX))
sid_list.append(make_sid(oids.ACU_HANDLER_ID, GsSetIds.ACU_AUX))
pcdu_pairs = [
(oids.P60_DOCK_HANDLER, GsSetIds.P60_CORE),
(oids.PDU_1_HANDLER_ID, GsSetIds.PDU_1_CORE),
(oids.PDU_2_HANDLER_ID, GsSetIds.PDU_2_CORE),
(oids.ACU_HANDLER_ID, GsSetIds.ACU_CORE),
(oids.P60_DOCK_HANDLER, GsSetIds.P60_AUX),
(oids.PDU_1_HANDLER_ID, GsSetIds.PDU_1_AUX),
(oids.PDU_2_HANDLER_ID, GsSetIds.PDU_2_AUX),
(oids.ACU_HANDLER_ID, GsSetIds.ACU_AUX),
]
for pcdu_dev in pcdu_pairs:
oid = pcdu_dev[0]
set_id = pcdu_dev[1]
sid_list.append(make_sid(oid, set_id))
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
@ -295,8 +302,9 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
(oids.GYRO_3_L3G_HANDLER_ID, L3gGyroSetIds_1_3.CORE_HK),
(oids.GPS_CONTROLLER, GpsSetIds.HK),
]
d_side_pairs = a_side_pairs + b_side_pairs
pack_acs_command(tc_queue=tc_queue, op_code="acs-a")
# MGMs
for a_side_dev in a_side_pairs:
oid = a_side_dev[0]
set_id = a_side_dev[1]
@ -331,33 +339,11 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
tc_queue.appendleft((QueueCommands.WAIT, 5.0))
pack_acs_command(tc_queue=tc_queue, op_code="acs-d")
# MGMs
sid_list.append(make_sid(oids.MGM_0_LIS3_HANDLER_ID, MgmLis3SetIds_0_2.CORE_HK))
sid_list.append(
make_sid(oids.MGM_1_RM3100_HANDLER_ID, MgmRm3100SetIds_1_3.CORE_HK)
)
sid_list.append(make_sid(oids.MGM_2_LIS3_HANDLER_ID, MgmLis3SetIds_0_2.CORE_HK))
sid_list.append(
make_sid(oids.MGM_3_RM3100_HANDLER_ID, MgmRm3100SetIds_1_3.CORE_HK)
)
# Gyros
sid_list.append(
make_sid(oids.GYRO_0_ADIS_HANDLER_ID, AdisGyroSetIds_0_2.CORE_HK)
)
sid_list.append(
make_sid(oids.GYRO_0_ADIS_HANDLER_ID, AdisGyroSetIds_0_2.CFG_HK)
)
sid_list.append(make_sid(oids.GYRO_1_L3G_HANDLER_ID, L3gGyroSetIds_1_3.CORE_HK))
sid_list.append(
make_sid(oids.GYRO_2_ADIS_HANDLER_ID, AdisGyroSetIds_0_2.CORE_HK)
)
sid_list.append(
make_sid(oids.GYRO_2_ADIS_HANDLER_ID, AdisGyroSetIds_0_2.CFG_HK)
)
sid_list.append(make_sid(oids.GYRO_3_L3G_HANDLER_ID, L3gGyroSetIds_1_3.CORE_HK))
# GNSS0+1
sid_list.append(make_sid(oids.GPS_CONTROLLER, GpsSetIds.HK))
sid_list.append(make_sid(oids.GPS_HANDLER_1_ID, GpsSetIds.HK))
for d_side_dev in d_side_pairs:
oid = d_side_dev[0]
set_id = d_side_dev[1]
sid_list.append(make_sid(oid, set_id))
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
@ -370,23 +356,47 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
if op_code in OpCodes.MGT_FT:
key = KAI.MGT_FT[0]
imtq_pairs = [
(oids.IMTQ_HANDLER_ID, ImtqSetIds.ENG_HK_SET),
(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET),
(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET),
]
# mgt 1: imtq und hk
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="2")
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.ENG_HK_SET))
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET))
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET))
cfg = GenericHkListeningCfg.default()
cfg.mgt = True
for imtq_dev in imtq_pairs:
oid = imtq_dev[0]
set_id = imtq_dev[1]
sid_list.append(make_sid(oid, set_id))
pack_generic_hk_listening_cmds(
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, cfg=cfg
tc_queue=tc_queue, proc_key=key, sid_list=sid_list, diag=False, cfg=GenericHkListeningCfg.default()
)
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="0")
if op_code in OpCodes.MGT_FT_DP:
key = KAI.MGT_FT_DP[0]
a_side_pairs = [
(oids.MGM_0_LIS3_HANDLER_ID, MgmLis3SetIds_0_2.CORE_HK),
(oids.MGM_1_RM3100_HANDLER_ID, MgmRm3100SetIds_1_3.CORE_HK),
(oids.GYRO_0_ADIS_HANDLER_ID, AdisGyroSetIds_0_2.CORE_HK),
(oids.GYRO_1_L3G_HANDLER_ID, L3gGyroSetIds_1_3.CORE_HK),
(oids.GPS_CONTROLLER, GpsSetIds.HK),
]
b_side_pairs = [
(oids.MGM_2_LIS3_HANDLER_ID, MgmLis3SetIds_0_2.CORE_HK),
(oids.MGM_3_RM3100_HANDLER_ID, MgmRm3100SetIds_1_3.CORE_HK),
(oids.GYRO_2_ADIS_HANDLER_ID, AdisGyroSetIds_0_2.CORE_HK),
(oids.GYRO_3_L3G_HANDLER_ID, L3gGyroSetIds_1_3.CORE_HK),
(oids.GPS_CONTROLLER, GpsSetIds.HK),
]
imtq_pairs = [
(oids.IMTQ_HANDLER_ID, ImtqSetIds.ENG_HK_SET),
(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET),
(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET),
]
d_side_and_imtq_pairs = a_side_pairs + b_side_pairs + imtq_pairs
pack_acs_command(tc_queue=tc_queue, op_code="acs-d")
# mgt 2.: imtq + dual side + dipole
@ -394,15 +404,19 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
object_id=oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="2"
)
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.ENG_HK_SET))
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.CAL_MTM_SET))
sid_list.append(make_sid(oids.IMTQ_HANDLER_ID, ImtqSetIds.RAW_MTM_SET))
for d_side_and_imtq_dev in d_side_and_imtq_pairs:
oid = d_side_and_imtq_dev[0]
set_id = d_side_and_imtq_dev[1]
sid_list.append(make_sid(oid, set_id))
cfg = GenericHkListeningCfg.default()
cfg.mgt = True
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
sid_list=sid_list,
diag=False,
cfg=GenericHkListeningCfg.default(),
cfg=cfg,
)
pack_imtq_test_into(oids.IMTQ_HANDLER_ID, tc_queue=tc_queue, op_code="0")
@ -497,27 +511,33 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
if op_code in OpCodes.RW_FT_ONE_RW:
key = KAI.RW_FT_ONE_RW[0]
rw_pairs = [
(oids.RW1_ID, RwSetIds.STATUS_SET_ID),
(oids.RW1_ID, RwSetIds.TEMPERATURE_SET_ID),
(oids.RW1_ID, RwSetIds.LAST_RESET),
(oids.RW1_ID, RwSetIds.TM_SET),
(oids.RW2_ID, RwSetIds.STATUS_SET_ID),
(oids.RW2_ID, RwSetIds.TEMPERATURE_SET_ID),
(oids.RW2_ID, RwSetIds.LAST_RESET),
(oids.RW2_ID, RwSetIds.TM_SET),
(oids.RW3_ID, RwSetIds.STATUS_SET_ID),
(oids.RW3_ID, RwSetIds.TEMPERATURE_SET_ID),
(oids.RW3_ID, RwSetIds.LAST_RESET),
(oids.RW3_ID, RwSetIds.TM_SET),
(oids.RW4_ID, RwSetIds.STATUS_SET_ID),
(oids.RW4_ID, RwSetIds.TEMPERATURE_SET_ID),
(oids.RW4_ID, RwSetIds.LAST_RESET),
(oids.RW4_ID, RwSetIds.TM_SET),
]
# RW NORMAL
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="nml")
# RW HK für alle RWs nur einzeln
sid_list.append(make_sid(oids.RW1_ID, RwSetIds.STATUS_SET_ID))
sid_list.append(make_sid(oids.RW1_ID, RwSetIds.TEMPERATURE_SET_ID))
sid_list.append(make_sid(oids.RW1_ID, RwSetIds.LAST_RESET))
sid_list.append(make_sid(oids.RW1_ID, RwSetIds.TM_SET))
sid_list.append(make_sid(oids.RW2_ID, RwSetIds.STATUS_SET_ID))
sid_list.append(make_sid(oids.RW2_ID, RwSetIds.TEMPERATURE_SET_ID))
sid_list.append(make_sid(oids.RW2_ID, RwSetIds.LAST_RESET))
sid_list.append(make_sid(oids.RW2_ID, RwSetIds.TM_SET))
sid_list.append(make_sid(oids.RW3_ID, RwSetIds.STATUS_SET_ID))
sid_list.append(make_sid(oids.RW3_ID, RwSetIds.TEMPERATURE_SET_ID))
sid_list.append(make_sid(oids.RW3_ID, RwSetIds.LAST_RESET))
sid_list.append(make_sid(oids.RW3_ID, RwSetIds.TM_SET))
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.STATUS_SET_ID))
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.TEMPERATURE_SET_ID))
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.LAST_RESET))
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.TM_SET))
for rw_dev in rw_pairs:
oid = rw_dev[0]
set_id = rw_dev[1]
sid_list.append(make_sid(oid, set_id))
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
@ -531,26 +551,32 @@ def pack_proc_commands(tc_queue: TcQueueT, op_code: str):
# ass command with 2 rws to speed
if op_code in OpCodes.RW_FT_TWO_RWS:
key = KAI.RW_FT_TWO_RWS[0]
rw_pairs = [
(oids.RW1_ID, RwSetIds.STATUS_SET_ID),
(oids.RW1_ID, RwSetIds.TEMPERATURE_SET_ID),
(oids.RW1_ID, RwSetIds.LAST_RESET),
(oids.RW1_ID, RwSetIds.TM_SET),
(oids.RW2_ID, RwSetIds.STATUS_SET_ID),
(oids.RW2_ID, RwSetIds.TEMPERATURE_SET_ID),
(oids.RW2_ID, RwSetIds.LAST_RESET),
(oids.RW2_ID, RwSetIds.TM_SET),
(oids.RW3_ID, RwSetIds.STATUS_SET_ID),
(oids.RW3_ID, RwSetIds.TEMPERATURE_SET_ID),
(oids.RW3_ID, RwSetIds.LAST_RESET),
(oids.RW3_ID, RwSetIds.TM_SET),
(oids.RW4_ID, RwSetIds.STATUS_SET_ID),
(oids.RW4_ID, RwSetIds.TEMPERATURE_SET_ID),
(oids.RW4_ID, RwSetIds.LAST_RESET),
(oids.RW4_ID, RwSetIds.TM_SET),
]
# RW NORMAL
pack_rw_ass_cmds(object_id=oids.RW_ASSEMBLY, tc_queue=tc_queue, op_code="nml")
# RW
sid_list.append(make_sid(oids.RW1_ID, RwSetIds.STATUS_SET_ID))
sid_list.append(make_sid(oids.RW1_ID, RwSetIds.TEMPERATURE_SET_ID))
sid_list.append(make_sid(oids.RW1_ID, RwSetIds.LAST_RESET))
sid_list.append(make_sid(oids.RW1_ID, RwSetIds.TM_SET))
sid_list.append(make_sid(oids.RW2_ID, RwSetIds.STATUS_SET_ID))
sid_list.append(make_sid(oids.RW2_ID, RwSetIds.TEMPERATURE_SET_ID))
sid_list.append(make_sid(oids.RW2_ID, RwSetIds.LAST_RESET))
sid_list.append(make_sid(oids.RW2_ID, RwSetIds.TM_SET))
sid_list.append(make_sid(oids.RW3_ID, RwSetIds.STATUS_SET_ID))
sid_list.append(make_sid(oids.RW3_ID, RwSetIds.TEMPERATURE_SET_ID))
sid_list.append(make_sid(oids.RW3_ID, RwSetIds.LAST_RESET))
sid_list.append(make_sid(oids.RW3_ID, RwSetIds.TM_SET))
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.STATUS_SET_ID))
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.TEMPERATURE_SET_ID))
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.LAST_RESET))
sid_list.append(make_sid(oids.RW4_ID, RwSetIds.TM_SET))
for rw_dev in rw_pairs:
oid = rw_dev[0]
set_id = rw_dev[1]
sid_list.append(make_sid(oid, set_id))
pack_generic_hk_listening_cmds(
tc_queue=tc_queue,
proc_key=key,
@ -662,7 +688,7 @@ def rw_speed_cmd_single(
tc_queue.appendleft(command.pack_command_tuple())
tc_queue.appendleft((QueueCommands.WAIT, 70.0))
command = pack_set_speed_command(
object_id=oids.RW1_ID, speed=0, ramp_time_ms=ramp_time, ssc=init_ssc
object_id=oid, speed=0, ramp_time_ms=ramp_time, ssc=init_ssc
)
tc_queue.appendleft(command.pack_command_tuple())
return init_ssc + 1
@ -701,19 +727,19 @@ def activate_all_rws_in_sequence(
new_ssc = rw_speed_cmd_single(
tc_queue, oids.RW1_ID, new_ssc, test_speed, test_ramp_time
)
tc_queue.appendleft((QueueCommands.WAIT, 10.0))
tc_queue.appendleft((QueueCommands.WAIT, 15.0))
new_ssc = rw_speed_cmd_single(
tc_queue, oids.RW2_ID, new_ssc, test_speed, test_ramp_time
)
tc_queue.appendleft((QueueCommands.WAIT, 10.0))
tc_queue.appendleft((QueueCommands.WAIT, 15.0))
new_ssc = rw_speed_cmd_single(
tc_queue, oids.RW3_ID, new_ssc, test_speed, test_ramp_time
)
tc_queue.appendleft((QueueCommands.WAIT, 10.0))
tc_queue.appendleft((QueueCommands.WAIT, 15.0))
new_ssc = rw_speed_cmd_single(
tc_queue, oids.RW4_ID, new_ssc, test_speed, test_ramp_time
)
tc_queue.appendleft((QueueCommands.WAIT, 5.0))
tc_queue.appendleft((QueueCommands.WAIT, 15.0))
return new_ssc
@ -724,17 +750,18 @@ def activate_all_rws_two_consecutively(tc_queue: TcQueueT, init_ssc: int) -> int
new_ssc = rw_speed_up_cmd_consec(
tc_queue, [oids.RW1_ID, oids.RW3_ID], new_ssc, -20000, 10000
)
tc_queue.appendleft((QueueCommands.WAIT, 10.0))
tc_queue.appendleft((QueueCommands.WAIT, 70.0))
new_ssc = rw_speed_down_cmd_consec(
tc_queue, [oids.RW1_ID, oids.RW3_ID], new_ssc, 10000
)
tc_queue.appendleft((QueueCommands.WAIT, 15.0))
# RW2+4 speed cmd
new_ssc = rw_speed_up_cmd_consec(
tc_queue, [oids.RW2_ID, oids.RW4_ID], new_ssc, -20000, 10000
)
tc_queue.appendleft((QueueCommands.WAIT, 70.0))
new_ssc = rw_speed_down_cmd_consec(
tc_queue, [oids.RW1_ID, oids.RW3_ID], new_ssc, 10000
)
tc_queue.appendleft((QueueCommands.WAIT, 5.0))
new_ssc = rw_speed_down_cmd_consec(
tc_queue, [oids.RW2_ID, oids.RW4_ID], new_ssc, 10000
)
tc_queue.appendleft((QueueCommands.WAIT, 15.0))
return new_ssc