Module: thrFiringSchmitt

A Schmitt trigger logic is implemented to map a desired thruster force value into a thruster on command time.

The module reads in the attitude control thruster force values for both on- and off-pulsing scenarios, and then maps this into a time which specifies how long a thruster should be on. The thruster configuration data is read in through a separate input message in the reset method. The Schmitt trigger allows for an upper and lower bound where the thruster is either turned on or off. 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 Schmitt Trigger and compares it to other thruster firing methods.


Functions

void SelfInit_thrFiringSchmitt(thrFiringSchmittConfig *configData, int64_t moduleID)

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

Return

void

Parameters
  • configData: The configuration data associated with this module

void CrossInit_thrFiringSchmitt(thrFiringSchmittConfig *configData, int64_t moduleID)

This method performs the second stage of initialization for this module. It links to 2 required input messages of type THRArrayCmdForceFswMsg and THRArrayConfigFswMsg.

Return

void

Parameters
  • configData: The configuration data associated with this module

void Update_thrFiringSchmitt(thrFiringSchmittConfig *configData, uint64_t callTime, int64_t moduleID)

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

Return

void

Parameters
  • configData: The configuration data associated with the module

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

void Reset_thrFiringSchmitt(thrFiringSchmittConfig *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.

Return

void

Parameters
  • configData: The configuration data associated with the module

struct thrFiringSchmittConfig
#include <thrFiringSchmitt.h>

Top level structure for the sub-module routines.

Public Members

double level_on

[-] ON duty cycle fraction

double level_off

[-] OFF duty cycle fraction

double thrMinFireTime

[s] Minimum ON time for thrusters

int baseThrustState

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

int numThrusters

[-] The number of thrusters available on vehicle

double maxThrust[MAX_EFF_CNT]

[N] Max thrust

boolean_t lastThrustState[MAX_EFF_CNT]

[-] ON/OFF state of thrusters from previous call

uint64_t prevCallTime

callTime from previous function call

char thrForceInMsgName[MAX_STAT_MSG_LENGTH]

The name of the Input message.

int32_t thrForceInMsgId

ID for the incoming message.

char onTimeOutMsgName[MAX_STAT_MSG_LENGTH]

The name of the output message*, onTimeOutMsgName.

int32_t onTimeOutMsgId

ID for the outgoing message.

char thrConfInMsgName[MAX_STAT_MSG_LENGTH]

The name of the thruster cluster Input message.

int32_t thrConfInMsgId

ID for the incoming Thruster configuration data.

BSKLogger *bskLogger

BSK Logging.