Module: thrMomentumManagement¶
This module reads in the Reaction Wheel (RW) speeds, determines the net RW momentum, and then determines the amount of angular momentum that must be dumped.
A separate thruster firing logic module called thrMomentumDumping will later on compute the thruster on cycling. The module
PDF Description
contains further information on this module’s function, how to run it, as well as testing.
Functions
-
void
SelfInit_thrMomentumManagement
(thrMomentumManagementConfig *configData, int64_t moduleID)¶ This method initializes the configData for this module. It creates a single output message of type CmdTorqueBodyIntMsg.
- Return
void
- Parameters
configData
: The configuration data associated with this module
-
void
CrossInit_thrMomentumManagement
(thrMomentumManagementConfig *configData, int64_t moduleID)¶ This method performs the second stage of initialization for this module. It links to 2 required input messages of type RWArrayConfigFswMsg and RWSpeedIntMsg.
- Return
void
- Parameters
configData
: The configuration data associated with this module
-
void
Update_thrMomentumManagement
(thrMomentumManagementConfig *configData, uint64_t callTime, int64_t moduleID)¶ The RW momentum level is assessed to determine if a momentum dumping maneuver is required. This checking only happens once after the reset function is called. To run this again afterwards, the reset function must be called again.
- Return
void
- Parameters
configData
: The configuration data associated with the modulecallTime
: The clock time at which the function was called (nanoseconds)
-
void
Reset_thrMomentumManagement
(thrMomentumManagementConfig *configData, uint64_t callTime, int64_t moduleID)¶ This method performs a complete reset of the module. Local module variables that retain time varying states between function calls are reset to their default values.
- Return
void
- Parameters
configData
: The configuration data associated with the module
-
struct
thrMomentumManagementConfig
¶ - #include <thrMomentumManagement.h>
Module configuration message definition.
Public Members
-
int
initRequest
¶ [-] status flag of the momentum dumping management
-
RWArrayConfigFswMsg
rwConfigParams
¶ [-] struct to store message containing RW config parameters in body B frame
-
double
hs_min
¶ [Nms] minimum RW cluster momentum for dumping
-
char
deltaHOutMsgName
[MAX_STAT_MSG_LENGTH
]¶ The name of the output message.
-
int32_t
deltaHOutMsgId
¶ ID for the outgoing message.
-
char
rwSpeedsInMsgName
[MAX_STAT_MSG_LENGTH
]¶ [] The name for the reaction wheel speeds message
-
int32_t
rwSpeedsInMsgId
¶ [] The ID for the reaction wheel speeds message
-
char
rwConfigDataInMsgName
[MAX_STAT_MSG_LENGTH
]¶ [-] The name of the RWA configuration message
-
int32_t
rwConfInMsgId
¶ [-] ID for the incoming RWA configuration data
-
int