rwMotorTorque#

Executive Summary#

This module maps a desired torque to control the spacecraft, and maps it to the available wheels using a minimum norm inverse fit.

The optional wheel availability message is used to include or exclude particular reaction wheels from the torque solution. The desired control torque can be mapped onto particular orthogonal control axes to implement a partial solution for the overall attitude control torque. More information can be found in the PDF Description.

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.

Module I/O Messages#

Msg Variable Name

Msg Type

Description

rwMotorTorqueOutMsg

ArrayMotorTorqueMsgPayload

RW motor torque output message

vehControlInMsg

CmdTorqueBodyMsgPayload

commanded vehicle control torque input message

vehControlIn2Msg

CmdTorqueBodyMsgPayload

(optional) additional commanded vehicle control torque input message

rwParamsInMsg

RWArrayConfigMsgPayload

RW array configuration input message

rwAvailInMsg

RWAvailabilityMsgPayload

(optional) RW device availability message

Class RwMotorTorque#

class RwMotorTorque : public SysModel#

Top level structure for the sub-module routines.

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#

Add a description of what this main Update() routine does for this module

Parameters:

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

Returns:

void

Public Members

double controlAxes_B[3 * 3]#

[-] array of the control unit axes

uint32_t numControlAxes#

[-] counter indicating how many orthogonal axes are controlled

int numAvailRW#

[-] number of reaction wheels available

RWArrayConfigMsgPayload rwConfigParams#

[-] struct to store message containing RW config parameters in body B frame

double GsMatrix_B[3 * MAX_EFF_CNT]#

[-] The RW spin axis matrix in body frame components

double CGs[3][MAX_EFF_CNT]#

[-] Projection matrix that defines the controlled body axes

Message<ArrayMotorTorqueMsgPayload> rwMotorTorqueOutMsg#

RW motor torque output message.

ReadFunctor<CmdTorqueBodyMsgPayload> vehControlInMsg#

vehicle control (Lr) Input message

ReadFunctor<CmdTorqueBodyMsgPayload> vehControlIn2Msg#

optional vehicle control input message

ReadFunctor<RWArrayConfigMsgPayload> rwParamsInMsg#

RW Array input message.

ReadFunctor<RWAvailabilityMsgPayload> rwAvailInMsg#

optional RWs availability input message

BSKLogger bskLogger = {}#

BSK Logging.