rateDamp#
Executive Summary#
This module implements a feedback control law to damp the angular rates of the spacecraft until they are brought to zero.
Message Connection Descriptions#
The following table lists all the module input and output messages. 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 |
|---|---|---|
navAttInMsg |
NavAttMsgPayload |
Input navigation message |
cmdTorqueOutMsg |
CmdTorqueBodyMsgPayload |
Output C++-wrapped message containing the rate-damping torque in Body-frame coordinates |
cmdTorqueOutMsgC |
CmdTorqueBodyMsgPayload |
Output C-wrapped message containing the rate-damping torque in Body-frame coordinates |
Detailed Module Description#
The control law implemented is the following:
where \(P\) is a positive, user-defined scalar quantity. The control law is globally asymptotically stabilizing.
User Guide#
The required module configuration is:
attControl = rateDamp.RateDamp()
attControl.setRateGain(P)
attControl.modelTag = "rateDamp"
Class RateDamp#
-
class RateDamp : public SysModel#
Rate damp class.
Public Functions
-
RateDamp() = default#
Constructor.
-
~RateDamp() = default#
Destructor.
-
void reset(uint64_t currentSimNanos) override#
Reset method.
Reset method for the BSK module adapter interface.
- Parameters:
currentSimNanos – [ns] Time the method is called
- Returns:
void
-
void updateState(uint64_t currentSimNanos) override#
Update method.
Update method for the BSK module adapter interface. This method also calls the algorithm update method.
- Parameters:
currentSimNanos – [ns] Time the method is called
- Returns:
void
-
void setRateGain(double p)#
Setter method for rate feedback gain.
Set the module rate feedback gain
- Parameters:
double – P
- Returns:
void
-
double getRateGain() const#
Getter method for rate feedback gain.
Get the module rate feedback gain
- Parameters:
double – measurementNoiseScale
- Returns:
void
Public Members
Navigation input message.
-
Message<CmdTorqueBodyMsgPayload> cmdTorqueOutMsg#
Command torque output message.
-
RateDamp() = default#