thrForceMapping#
Executive Summary#
This module reads in a desired attitude control torque vector and maps it onto a set of thrusters.
The module works for both on-pulsing (nominal thruster state is off such as with RCS thrusters)
and off-pulsing (nominal thruster state is on such as with DV thrusters).
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.
Msg Variable Name |
Msg Type |
Description |
|---|---|---|
thrForceCmdOutMsg |
THRArrayCmdForceMsgPayload |
thruster force output message |
cmdTorqueInMsg |
CmdTorqueBodyMsgPayload |
commanded attitude control torque vector input message |
thrConfigInMsg |
THRArrayConfigMsgPayload |
Thruster array configuration input message |
vehConfigInMsg |
VehicleConfigMsgPayload |
spacecraft configuration input message |
Class ThrForceMapping#
-
class ThrForceMapping : public SysModel#
Thruster force mapping class.
Public Functions
-
ThrForceMapping() = default#
Constructor.
-
~ThrForceMapping() = default#
Destructor.
-
void reset(uint64_t callTime) override#
Reset method.
Reset method for the BSK module adapter interface. This method also calls the algorithm reset method.
- Parameters:
callTime – [ns] Time the method is called
- Returns:
void
-
void updateState(uint64_t callTime) override#
Update method.
Update method for the BSK module adapter interface. This method also calls the algorithm update method.
- Parameters:
callTime – [ns] Time the method is called
- Returns:
void
-
Eigen::Matrix3d getControlAxesB() const#
Getter method for thruster control axes.
Get the control axes in the body frame.
- Returns:
3x3 matrix representing the control axes in the body frame.
-
void setControlAxesB(const Eigen::Matrix3d &axes)#
Setter method for thruster control axes.
Set the control axes in body frame.
- Parameters:
axes – A 3x3 matrix representing the control axes in body frame.
-
Vector36d getThrForceMag() const#
Getter method for the thruster force magnitude.
Get the thruster force magnitudes.
- Returns:
A vector of thruster force magnitudes.
-
void setThrForceMag(const Vector36d &forceMag)#
Setter method for the thruster force magnitude.
Set the thruster force magnitudes.
- Parameters:
forceMag – A vector of thruster force magnitudes.
-
ThrForceSign getThrForceSign() const#
Getter method for the thruster force sign.
Get the sign of the thruster forces.
- Returns:
The sign of the thruster forces (POSITIVE or NEGATIVE).
-
void setThrForceSign(ThrForceSign sign)#
Setter method for the thruster force sign.
Set the sign of the thruster forces.
- Parameters:
sign – The sign of the thruster forces (POSITIVE or NEGATIVE).
-
double getAngErrThresh() const#
Getter method for the angular error threshold.
Get the angular error threshold.
- Returns:
The angular error threshold.
-
void setAngErrThresh(double thresh)#
Setter method for the angular error threshold.
Set the angular error threshold.
- Parameters:
The – new angular error threshold.
-
double getEpsilon() const#
Getter method for the epsilon value.
Get the epsilon value.
- Returns:
The epsilon value.
-
void setEpsilon(double eps)#
Setter method for the epsilon value.
Set the epsilon value.
- Parameters:
The – new epsilon value.
-
bool getUse2ndLoop() const#
Getter method for whether the second least squares fitting loop should be used.
Check if the second least squares fitting loop should be used.
- Returns:
True if the 2nd loop should be used, false otherwise.
-
void setUse2ndLoop(bool loopFlag)#
Getter method for whether the second least squares fitting loop should be used.
Set if the second least squares fitting loop should be used.
- Returns:
True if the 2nd loop should be used, false otherwise.
Public Members
-
Message<THRArrayCmdForceMsgPayload> thrForceCmdOutMsg#
The name of the output thruster force message.
-
ReadFunctor<CmdTorqueBodyMsgPayload> cmdTorqueInMsg#
The name of the vehicle control (Lr) Input message.
-
ReadFunctor<THRArrayConfigMsgPayload> thrConfigInMsg#
The name of the thruster cluster Input message.
-
ReadFunctor<VehicleConfigMsgPayload> vehConfigInMsg#
The name of the Input message.
-
BSKLogger bskLogger = {}#
BSK Logging.
-
ThrForceMapping() = default#