thrMomentumDumping#

Executive Summary#

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.

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.

../../../../../_images/moduleImgThrMomentumDumping.svg

Figure 1: thrMomentumDumping() Module I/O Illustration#

Module I/O Messages#

Msg Variable Name

Msg Type

Description

thrusterOnTimeOutMsg

THRArrayOnTimeCmdMsgPayload

thruster on time output message

thrusterImpulseInMsg

THRArrayCmdForceMsgPayload

commanded thruster impulse input message

thrusterConfInMsg

THRArrayConfigMsgPayload

Thruster array configuration input message

deltaHInMsg

CmdTorqueBodyMsgPayload

requested momentum change input message

Class ThrMomentumDumping#

class ThrMomentumDumping : public SysModel#

thruster force momentum dumping module configuration message

Public Functions

void reset(uint64_t callTime) override#

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.

Parameters:

callTime – The clock time at which the function was called (nanoseconds)

Returns:

void

void updateState(uint64_t callTime) override#

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.

Parameters:

callTime – The clock time at which the function was called (nanoseconds)

Returns:

void

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

Message<THRArrayOnTimeCmdMsgPayload> thrusterOnTimeOutMsg#

thruster on time output message name

ReadFunctor<THRArrayCmdForceMsgPayload> thrusterImpulseInMsg#

desired thruster impulse input message name

ReadFunctor<THRArrayConfigMsgPayload> thrusterConfInMsg#

The name of the thruster configuration Input message.

ReadFunctor<CmdTorqueBodyMsgPayload> deltaHInMsg#

The name of the requested momentum change input message.

BSKLogger bskLogger = {}#

BSK Logging.