Module: rwNullSpace

Executive Summary

This module uses the Reaction Wheel (RW) null space to slow down the wheels. The resulting motor torques are super imposed on top of the attitude feedback control RW motor torques. 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.

../../../../_images/moduleImgNullSpace.svg

Figure 1: rwNullSpace() Module I/O Illustration

Module I/O Messages

Msg Variable Name

Msg Type

Description

rwMotorTorqueInMsg

ArrayMotorTorqueMsgPayload

RW motor torque input message

rwSpeedsInMsg

RWSpeedMsgPayload

RW speed message

rwDesiredSpeedsInMsg

RWSpeedMsgPayload

(optional) input message with the desired RW speeds

rwConfigInMsg

RWConstellationMsgPayload

RW constellation configuration input message

rwMotorTorqueOutMsg

ArrayMotorTorqueMsgPayload

RW motor torque output message


Functions

void SelfInit_rwNullSpace(rwNullSpaceConfig *configData, int64_t moduleID)

This method creates the module output message of type ArrayMotorTorqueMsgPayload.

Parameters
  • configData – The configuration data associated with RW null space model

  • moduleID – The ID associated with the configData

Returns

void

void Update_rwNullSpace(rwNullSpaceConfig *configData, uint64_t callTime, int64_t moduleID)

This method takes the input reaction wheel commands as well as the observed reaction wheel speeds and balances the commands so that the overall vehicle momentum is minimized.

Parameters
  • configData – The configuration data associated with the null space control

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

  • moduleID – The ID associated with the configData

Returns

void

void Reset_rwNullSpace(rwNullSpaceConfig *configData, uint64_t callTime, int64_t moduleID)

This resets the module to original states by reading in the RW configuration messages and recreating any module specific variables. The output message is reset to zero.

Parameters
  • configData – The configuration data associated with the null space control

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

  • moduleID – The ID associated with the configData

Returns

void

struct rwNullSpaceConfig
#include <rwNullSpace.h>

The configuration structure for the rwNullSpace module.

Public Members

ArrayMotorTorqueMsg_C rwMotorTorqueInMsg

[-] The name of the Input message

RWSpeedMsg_C rwSpeedsInMsg

[-] The name of the input RW speeds

RWSpeedMsg_C rwDesiredSpeedsInMsg

[-] (optional) The name of the desired RW speeds

RWConstellationMsg_C rwConfigInMsg

[-] The name of the RWA configuration message

ArrayMotorTorqueMsg_C rwMotorTorqueOutMsg

[-] The name of the output message

double tau[MAX_EFF_CNT * MAX_EFF_CNT]

[-] RW nullspace project matrix

double OmegaGain

[-] The gain factor applied to the RW speeds

uint32_t numWheels

[-] The number of reaction wheels we have

BSKLogger *bskLogger

BSK Logging.