Module: thrFiringRemainder¶
A thruster force message is read in and converted to a thruster on-time output message. The module ensures the requested on-time is at least as large as the thruster’s minimum on time.  If not then the on-time is zeroed, but the unimplemented thrust time is kept as a remainder calculation.  If these add up to reach the minimum on time, then a thruster pulse is requested.  If the thruster on time is larger than the control period, then an on-time that is 1.1 times the control period is requested. More information can be found in the
PDF Description.
The paper Steady-State Attitude and Control Effort Sensitivity Analysis of Discretized Thruster Implementations includes a detailed discussion on the Remainder Trigger algorithm and compares it to other thruster firing methods.
Functions
- 
void SelfInit_thrFiringRemainder(thrFiringRemainderConfig *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
- moduleID: The ID associated with the configData
 
 
- 
void CrossInit_thrFiringRemainder(thrFiringRemainderConfig *configData, int64_t moduleID)¶
- This method performs the second stage of initialization for this module. It links to 2 required input messages of type thrArrayCmdForceFswMsg and thrArrayConfigFswMsg. - Return
- void 
- Parameters
- configData: The configuration data associated with this module
- moduleID: The ID associated with the configData
 
 
- 
void Update_thrFiringRemainder(thrFiringRemainderConfig *configData, uint64_t callTime, int64_t moduleID)¶
- This method maps the input thruster command forces into thruster on times using a remainder tracking logic. - Return
- void 
- Parameters
- configData: The configuration data associated with the module
- callTime: The clock time at which the function was called (nanoseconds)
- moduleID: The ID associated with the configData
 
 
- 
void Reset_thrFiringRemainder(thrFiringRemainderConfig *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
- callTime: The clock time at which the function was called (nanoseconds)
- moduleID: The ID associated with the configData
 
 
- 
struct thrFiringRemainderConfig¶
- #include <thrFiringRemainder.h>Top level structure for the sub-module routines. Public Members - 
double pulseRemainder[MAX_EFF_CNT]¶
- [-] Unimplemented thrust pulses (number of minimum pulses) 
 - 
double thrMinFireTime¶
- [s] Minimum fire time 
 - 
int numThrusters¶
- [-] The number of thrusters available on vehicle 
 - 
double maxThrust[MAX_EFF_CNT]¶
- [N] Max thrust 
 - 
int baseThrustState¶
- [-] Indicates on-pulsing (0) or off-pusling (1) 
 - 
uint64_t prevCallTime¶
- callTime from previous function call 
 - 
char thrForceInMsgName[MAX_STAT_MSG_LENGTH]¶
- The name of the Input message. 
 - 
int32_t thrForceInMsgId¶
- ID for the incoming message. 
 - 
char onTimeOutMsgName[MAX_STAT_MSG_LENGTH]¶
- The name of the output message, onTimeOutMsgName. 
 - 
int32_t onTimeOutMsgId¶
- ID for the outgoing message. 
 - 
char thrConfInMsgName[MAX_STAT_MSG_LENGTH]¶
- The name of the thruster cluster Input message. 
 - 
int32_t thrConfInMsgId¶
- ID for the incoming Thruster configuration data. 
 - 
BSKLogger *bskLogger¶
- BSK Logging. 
 
- 
double