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#
Data structure for module to map a command torque onto thruster forces.
Public Functions
-
void reset(uint64_t callTime) override#
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:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
-
void updateState(uint64_t callTime) override#
The module takes a body frame torque vector and projects it onto available RCS or DV thrusters.
- Parameters:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
-
Eigen::Matrix3d getControlAxesB() const#
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)#
Set the control axes in body frame.
- Parameters:
axes – A 3x3 matrix representing the control axes in body frame.
-
Vector36d getThrForceMag() const#
Get the thruster force magnitudes.
- Returns:
A vector of thruster force magnitudes.
-
void setThrForceMag(const Vector36d &forceMag)#
Set the thruster force magnitudes.
- Parameters:
forceMag – A vector of thruster force magnitudes.
-
ThrForceSign getThrForceSign() const#
Get the sign of the thruster forces.
- Returns:
The sign of the thruster forces (POSITIVE or NEGATIVE).
-
void setThrForceSign(ThrForceSign sign)#
Set the sign of the thruster forces.
- Parameters:
sign – The sign of the thruster forces (POSITIVE or NEGATIVE).
-
double getAngErrThresh() const#
Get the angular error threshold.
- Returns:
The angular error threshold.
-
void setAngErrThresh(double thresh)#
Set the angular error threshold.
- Parameters:
The – new angular error threshold.
-
double getEpsilon() const#
Get the epsilon value.
- Returns:
The epsilon value.
-
void setEpsilon(double eps)#
Set the epsilon value.
- Parameters:
The – new epsilon value.
-
bool getUse2ndLoop() const#
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)#
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.
-
VehicleConfigMsgPayload sc#
spacecraft configuration message
-
BSKLogger bskLogger = {}#
BSK Logging.
-
void reset(uint64_t callTime) override#