Module: thrMomentumManagement

Executive Summary

This module reads in the Reaction Wheel (RW) speeds, determines the net RW momentum, and then determines the amount of angular momentum that must be dumped.

A separate thruster firing logic module called thrMomentumDumping will later on compute the thruster on cycling. 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.

Module I/O Messages

Msg Variable Name

Msg Type

Description

deltaHOutMsg

CmdTorqueBodyMsgPayload

output message with the requested inertial angular momentum change

rwSpeedsInMsg

RWSpeedMsgPayload

reaction wheel speed input message

rwConfigDataInMsg

RWArrayConfigMsgPayload

name of the RWA configuration message


Functions

void SelfInit_thrMomentumManagement(thrMomentumManagementConfig *configData, int64_t moduleID)

This method initializes the configData for this module. It creates a single output message of type CmdTorqueBodyMsgPayload.

Parameters:
  • configData – The configuration data associated with this module

  • moduleID – The module identifier

Returns:

void

void Update_thrMomentumManagement(thrMomentumManagementConfig *configData, uint64_t callTime, int64_t moduleID)

The RW momentum level is assessed to determine if a momentum dumping maneuver is required. This checking only happens once after the reset function is called. To run this again afterwards, the reset function must be called again.

Parameters:
  • configData – The configuration data associated with the module

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

  • moduleID – The module identifier

Returns:

void

void Reset_thrMomentumManagement(thrMomentumManagementConfig *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.

Parameters:
  • configData – The configuration data associated with the module

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

  • moduleID – The module identifier

Returns:

void

struct thrMomentumManagementConfig
#include <thrMomentumManagement.h>

Module configuration message definition.

Public Members

int initRequest

[-] status flag of the momentum dumping management

RWArrayConfigMsgPayload rwConfigParams

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

double hs_min

[Nms] minimum RW cluster momentum for dumping

CmdTorqueBodyMsg_C deltaHOutMsg

The name of the output message.

RWSpeedMsg_C rwSpeedsInMsg

[] The name for the reaction wheel speeds message

RWArrayConfigMsg_C rwConfigDataInMsg

[-] The name of the RWA configuration message

BSKLogger *bskLogger

BSK Logging.