Module: thrFiringRemainder

Executive Summary

A thruster force message is read in and converted to a thruster on-time output message. The module ensures the requested on-time is at least as large as the thruster’s minimum on time. If not then the on-time is zeroed, but the unimplemented thrust time is kept as a remainder calculation. If these add up to reach the minimum on time, then a thruster pulse is requested. If the thruster on time is larger than the control period, then an on-time that is 1.1 times the control period is requested. More information can be found in the PDF Description. The paper Steady-State Attitude and Control Effort Sensitivity Analysis of Discretized Thruster Implementations includes a detailed discussion on the Remainder Trigger algorithm and compares it to other thruster firing methods.

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/moduleImgThrFiringRemainder.svg

Figure 1: rwNullSpace() Module I/O Illustration

Module I/O Messages

Msg Variable Name

Msg Type

Description

thrForceInMsg

THRArrayCmdForceMsgPayload

thruster force input message

onTimeOutMsg

THRArrayOnTimeCmdMsgPayload

thruster on-time output message

thrConfInMsg

THRArrayConfigMsgPayload

Thruster array configuration input message


Functions

void SelfInit_thrFiringRemainder(thrFiringRemainderConfig *configData, int64_t moduleID)

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

Parameters
  • configData – The configuration data associated with this module

  • moduleID – The ID associated with the configData

Returns

void

void Update_thrFiringRemainder(thrFiringRemainderConfig *configData, uint64_t callTime, int64_t moduleID)

This method maps the input thruster command forces into thruster on times using a remainder tracking logic.

Parameters
  • configData – The configuration data associated with the module

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

  • moduleID – The ID associated with the configData

Returns

void

void Reset_thrFiringRemainder(thrFiringRemainderConfig *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 ID associated with the configData

Returns

void

struct thrFiringRemainderConfig
#include <thrFiringRemainder.h>

Top level structure for the sub-module routines.

Public Members

double pulseRemainder[MAX_EFF_CNT]

[-] Unimplemented thrust pulses (number of minimum pulses)

double thrMinFireTime

[s] Minimum fire time

int numThrusters

[-] The number of thrusters available on vehicle

double maxThrust[MAX_EFF_CNT]

[N] Max thrust

int baseThrustState

[-] Indicates on-pulsing (0) or off-pulsing (1)

uint64_t prevCallTime

callTime from previous function call

THRArrayCmdForceMsg_C thrForceInMsg

The name of the Input message.

THRArrayOnTimeCmdMsg_C onTimeOutMsg

The name of the output message, onTimeOutMsg.

THRArrayConfigMsg_C thrConfInMsg

The name of the thruster cluster Input message.

BSKLogger *bskLogger

BSK Logging.