From 3974d4134a0cd9944235e225c3362c9148ed2b28 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 14 Mar 2023 17:24:21 +0100 Subject: [PATCH] added action command to restore mekf automatic recovery --- eive_tmtc/tmtc/acs/acs_ctrl.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eive_tmtc/tmtc/acs/acs_ctrl.py b/eive_tmtc/tmtc/acs/acs_ctrl.py index 5101c0a..8c257a8 100644 --- a/eive_tmtc/tmtc/acs/acs_ctrl.py +++ b/eive_tmtc/tmtc/acs/acs_ctrl.py @@ -60,6 +60,7 @@ class SetId(enum.IntEnum): class ActionId(enum.IntEnum): SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL = 0 RESET_MEKF = 1 + RESTORE_MEKF_NONFINITE_RECOVERY = 2 class OpCodes: @@ -73,6 +74,7 @@ class OpCodes: INERTIAL = ["ptg_inertial"] SAFE_PTG = ["confirm_deployment"] RESET_MEKF = ["reset_mekf"] + RESTORE_MEKF_NONFINITE_RECOVERY = ["restore_mekf_nonfinite_recovery"] SET_PARAMETER_SCALAR = ["set_scalar_param"] SET_PARAMETER_VECTOR = ["set_vector_param"] SET_PARAMETER_MATRIX = ["set_matrix_param"] @@ -119,6 +121,7 @@ class Info: INERTIAL = "Switch ACS CTRL normal - pointing inertial" SAFE_PTG = "Confirm deployment of both solar arrays" RESET_MEKF = "Reset the MEKF" + RESTORE_MEKF_NONFINITE_RECOVERY = "Restore MEKF non-finite recovery" SET_PARAMETER_SCALAR = "Set Scalar Parameter" SET_PARAMETER_VECTOR = "Set Vector Parameter" SET_PARAMETER_MATRIX = "Set Matrix Parameter" @@ -179,6 +182,7 @@ def acs_cmd_defs(defs: TmtcDefinitionWrapper): oce.add(keys=OpCodes.INERTIAL, info=Info.INERTIAL) oce.add(keys=OpCodes.SAFE_PTG, info=Info.SAFE_PTG) oce.add(keys=OpCodes.RESET_MEKF, info=Info.RESET_MEKF) + oce.add(keys=OpCodes.RESTORE_MEKF_NONFINITE_RECOVERY, info=Info.RESTORE_MEKF_NONFINITE_RECOVERY) oce.add(keys=OpCodes.SET_PARAMETER_SCALAR, info=Info.SET_PARAMETER_SCALAR) oce.add(keys=OpCodes.SET_PARAMETER_VECTOR, info=Info.SET_PARAMETER_VECTOR) oce.add(keys=OpCodes.SET_PARAMETER_MATRIX, info=Info.SET_PARAMETER_MATRIX) @@ -259,6 +263,9 @@ def pack_acs_ctrl_command(p: ServiceProviderParams): elif op_code in OpCodes.RESET_MEKF: q.add_log_cmd(f"{Info.RESET_MEKF}") q.add_pus_tc(create_action_cmd(ACS_CONTROLLER, ActionId.RESET_MEKF)) + elif op_code in OpCodes.RESTORE_MEKF_NONFINITE_RECOVERY: + q.add_log_cmd(f"{Info.RESTORE_MEKF_NONFINITE_RECOVERY}") + q.add_pus_tc(create_action_cmd(ACS_CONTROLLER, ActionId.RESTORE_MEKF_NONFINITE_RECOVERY)) elif op_code in OpCodes.SET_PARAMETER_SCALAR: q.add_log_cmd(f"{Info.SET_PARAMETER_SCALAR}") set_acs_ctrl_param_scalar(q) -- 2.43.0