Module: thrustRWDesat
Executive Summary
This algorithm is used to control both the RCS and DV thrusters when executing a trajectory adjustment.
Message Connection Descriptions
The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.
Msg Variable Name |
Msg Type |
Description |
---|---|---|
rwSpeedInMsg |
RW speed input message |
|
rwConfigInMsg |
RW configuration input message |
|
thrConfigInMsg |
Thruster configuration input message |
|
vecConfigInMsg |
spacecraft configuration input message |
|
thrCmdOutMsg |
thruster array commanded on time output message |
Functions
-
void SelfInit_thrustRWDesat(thrustRWDesatConfig *configData, int64_t moduleID)
This method initializes the configData for the thruster-based RW desat module. It checks to ensure that the inputs are sane and then creates the output message
- Parameters:
configData – The configuration data associated with the thruster desat
moduleID – The module ID associated with configData
- Returns:
void
-
void Reset_thrustRWDesat(thrustRWDesatConfig *configData, uint64_t callTime, int64_t moduleID)
-
void Update_thrustRWDesat(thrustRWDesatConfig *configData, uint64_t callTime, int64_t moduleID)
This method takes in the current oberved reaction wheel angular velocities.
- Parameters:
configData – The configuration data associated with the RW desat logic
callTime – The clock time at which the function was called (nanoseconds)
moduleID – The ID associated with the configData
- Returns:
void
-
struct thrustRWDesatConfig
- #include <thrustRWDesat.h>
module configuration message
Public Members
-
RWSpeedMsg_C rwSpeedInMsg
(-) The name of the input RW speeds message
-
RWConstellationMsg_C rwConfigInMsg
[-] The name of the RWA configuration message
-
THRArrayConfigMsg_C thrConfigInMsg
[-] The name of the thruster configuration message
-
VehicleConfigMsg_C vecConfigInMsg
[-] The name of the input spacecraft mass properties message
-
THRArrayOnTimeCmdMsg_C thrCmdOutMsg
(-) The name of the output thrust command block
-
double rwAlignMap[3 * MAX_EFF_CNT]
(-) Alignment of the reaction wheel spin axes
-
double thrAlignMap[3 * MAX_EFF_CNT]
(-) Alignment of the vehicle thrusters
-
double thrTorqueMap[3 * MAX_EFF_CNT]
(-) Alignment of the vehicle thruster torques
-
double maxFiring
(s) Maximum time to fire a jet for
-
double thrFiringPeriod
(s) The amount of time to rest between thruster firings
-
int numRWAs
(-) Number of reaction wheels being desaturated
-
int numThrusters
(-) Number of thrusters available in the align map
-
double accumulatedImp[3]
(s) The accumulated firing in the body frame
-
double currDMDir[3]
(-) The current direction of momentum reduction
-
double totalAccumFiring
(s) The total thruster duration we’ve commanded
-
double DMThresh
(r/s) The point at which to stop decrementing momentum
-
uint64_t previousFiring
(ns) Time that the last firing command was given
-
BSKLogger *bskLogger
BSK Logging.
-
RWSpeedMsg_C rwSpeedInMsg