Module: thrusterPlatformState

Executive Summary

This module simulates receives the measured tip and tilt angles of the thruster platform, together with the thruster configuration information expressed in platform-frame coordinates. The purpose of this module is to output the thruster configuration information in body-frame coordinates, at any instant in time, given the measured platform states (tip-and-tilt angles).

Message Connection Descriptions

The following table lists all the module input and output messages. The module msg variable name 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

thrusterConfigFInMsg

THRConfigMsgPayload

Input thruster configuration message containing the thrust direction vector and magnitude in platform frame coordinates. The entry rThrust_B here is the position of the thrust application point, with respect to the origin of the platform frame, in platform-frame coordinates (\({}^\mathcal{F}\boldsymbol{r}_{T/F}\)).

hingedRigidBody1InMsg

HingedRigidBodyMsgPayload

Input message containing the current tip angle and tip rate of the platform frame \(\mathcal{F}\) with respect to the mount frame \(\mathcal{M}\).

hingedRigidBody2InMsg

HingedRigidBodyMsgPayload

Input message containing the current tilt angle and tilt rate of the platform frame \(\mathcal{F}\) with respect to the mount frame \(\mathcal{M}\).

thrusterConfigBOutMsg

THRConfigMsgPayload

Output thruster configuration message containing the thrust direction vector and magnitude in body frame coordinates, as a function of tip and tilt angles. The entry rThrust_B here is the position of the thrust application point, with respect to the origin of the body frame, in body-frame coordinates (\({}^\mathcal{B}\boldsymbol{r}_{T/B}\)).

Detailed Module Description

This module reads the tip and tilt angles from the Module: spinningBodyTwoDOFStateEffector that simulates the platform. These angles allow to define the direction cosine matrix \([\mathcal{FM}]\) that describes the rotation between the platform frame \(\mathcal{F}\) with respect to the mount frame \(\mathcal{M}\). Accounting for the known offsets between the two frames, as well as the offset between the thruster application point and the origin of the frame \(\mathcal{F}\), this module outputs the thrust direction vector in body-frame coordinates \({}^\mathcal{B}\hat{t}\) and the position of the thrust application point with respect to the origin of the body frame \({}^\mathcal{B}r_{T/B}\).

A more detailed description of the thruster-platform assembly can be found in R. Calaon, L. Kiner, C. Allard and H. Schaub, “Momentum Management of a Spacecraft equipped with a Dual-Gimballed Electric Thruster” and in Module: thrusterPlatformReference.

User Guide

The required module configuration is:

platformState = thrusterPlatformState.thrusterPlatformState()
platformState.ModelTag = "platformState"
platformState.sigma_MB = sigma_MB
platformState.r_BM_M = r_BM_M
platformState.r_FM_F = r_FM_F
scSim.AddModelToTaskAddModelToTask(simTaskName, platformState)

The module is configurable with the following parameters:

Module Parameters

Parameter

Default

Description

sigma_MB

[0, 0, 0]

relative rotation between body-fixed frames \(\mathcal{M}\) and \(\mathcal{B}\)

r_BM_M

[0, 0, 0]

relative position of point \(B\) with respect to point \(M\), in \(\mathcal{M}\)-frame coordinates

r_FM_F

[0, 0, 0]

relative position of point \(F\) with respect to point \(M\), in \(\mathcal{F}\)-frame coordinates


Functions

void SelfInit_thrusterPlatformState(thrusterPlatformStateConfig *configData, int64_t moduleID)

This method initializes the output messages for this module.

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

  • moduleID – The module identifier

Returns:

void

void Reset_thrusterPlatformState(thrusterPlatformStateConfig *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 – [ns] time the method is called

  • moduleID – The module identifier

Returns:

void

void Update_thrusterPlatformState(thrusterPlatformStateConfig *configData, uint64_t callTime, int64_t moduleID)

This method updates the platformAngles message based on the updated information about the system center of mass

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 thrusterPlatformStateConfig
#include <thrusterPlatformState.h>

Top level structure for the sub-module routines.

Public Members

double sigma_MB[3]

orientation of the M frame w.r.t. the B frame

double r_BM_M[3]

position of B frame origin w.r.t. M frame origin, in M frame coordinates

double r_FM_F[3]

position of F frame origin w.r.t. M frame origin, in F frame coordinates

double K

momentum dumping time constant [1/s]

THRConfigMsg_C thrusterConfigFInMsg

input thruster configuration msg

HingedRigidBodyMsg_C hingedRigidBody1InMsg

output msg containing theta1 reference and thetaDot1 reference

HingedRigidBodyMsg_C hingedRigidBody2InMsg

output msg containing theta2 reference and thetaDot2 reference

THRConfigMsg_C thrusterConfigBOutMsg

output msg containing the thruster configuration infor in B-frame

BSKLogger *bskLogger

BSK Logging.