thrMomentumDumping¶
This module reads in the desired impulse that each thruster must produce to create inertial momentum change to despin the RWs.
The output of the module is a setup of thruster firing times.  Each thruster can only fire for a maximum time that matches a single control period.  After this the thrusters are off for an integer number of control periods to let the RW re-stabilize the attitude about an inertial pointing scenario. The module
PDF Description contains further information on this module’s function, how to run it, as well as testing.
Functions
- 
void SelfInit_thrMomentumDumping(thrMomentumDumpingConfig *configData, int64_t moduleID)¶
- This method initializes the configData for this module. It creates a single output message of type THRArrayOnTimeCmdIntMsg. - Return
- void 
- Parameters
- configData: The configuration data associated with this module
 
 
- 
void CrossInit_thrMomentumDumping(thrMomentumDumpingConfig *configData, int64_t moduleID)¶
- This method performs the second stage of initialization for this module. It links to 3 required input messages of type THRArrayCmdForceFswMsg, THRArrayConfigFswMsg and CmdTorqueBodyIntMsg. - Return
- void 
- Parameters
- configData: The configuration data associated with this module
 
 
- 
void Update_thrMomentumDumping(thrMomentumDumpingConfig *configData, uint64_t callTime, int64_t moduleID)¶
- This method reads in the requested thruster impulse message. If it is a new message then a fresh thruster firing cycle is setup to achieve the desired RW momentum dumping. The the same message is read in, then the thrust continue to periodically fire to achieve the net thruster impuleses requested. - Return
- void 
- Parameters
- configData: The configuration data associated with the module
- callTime: The clock time at which the function was called (nanoseconds)
 
 
- 
void Reset_thrMomentumDumping(thrMomentumDumpingConfig *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 thrMomentumDumpingConfig¶
- Public Members - 
int32_t thrDumpingCounter¶
- counter to specify after how many contro period a thruster firing should occur. 
 - 
double Delta_p[MAX_EFF_CNT]¶
- vector of desired total thruster impulses 
 - 
uint64_t lastDeltaHInMsgTime¶
- time tag of the last momentum change input message 
 - 
double thrOnTimeRemaining[MAX_EFF_CNT]¶
- vector of remaining thruster on times 
 - 
uint64_t priorTime¶
- [ns] Last time the attitude control is called 
 - 
int numThrusters¶
- number of thrusters installed 
 - 
double thrMaxForce[MAX_EFF_CNT]¶
- [N] vector of maximum thruster forces 
 - 
int maxCounterValue¶
- this variable must be set to a non-zero value, indicating how many control periods to wait until the thrusters fire again to dump RW momentum 
 - 
double thrMinFireTime¶
- [s] smallest thruster firing time 
 - 
char thrusterOnTimeOutMsgName[MAX_STAT_MSG_LENGTH]¶
- thruster on time output message name 
 - 
int32_t thrusterOnTimeOutMsgId¶
- ID of module output message. 
 - 
char thrusterImpulseInMsgName[MAX_STAT_MSG_LENGTH]¶
- desired thruster impulse input message name 
 - 
int32_t thrusterImpulseInMsgId¶
- ID of thruster impulse input message. 
 - 
char thrusterConfInMsgName[MAX_STAT_MSG_LENGTH]¶
- The name of the thruster configuration Input message. 
 - 
int32_t thrusterConfInMsgId¶
- [-] ID for the incoming Thruster configuration data 
 - 
char deltaHInMsgName[MAX_STAT_MSG_LENGTH]¶
- The name of the requested momentum change input message. 
 - 
int32_t deltaHInMsgId¶
- [-] ID for the incoming Thruster configuration data 
 
- 
int32_t