torque2Dipole#
Executive Summary#
This module computes a Body frame reequested dipole given a requested body torque and magnetic field vector.
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 |
---|---|---|
tamSensorBodyInMsg |
TAMSensorBodyMsgPayload |
input message for magnetic field sensor data |
tauRequestInMsg |
CmdTorqueBodyMsgPayload |
input message containing control torque in the Body frame |
dipoleRequestOutMsg |
DipoleRequestBodyMsgPayload |
output message containing dipole request in the Body frame |
Detailed Module Description#
The following presents the mathematics for converting a requested Body torque into a requested Body dipole to be produced the torque rods given the local magnetic field vector. The desired Body frame dipole is given by
where \(\bf b\) is the local magnetic field vector and \([G_t]\) is a 3 \(\times N_{\text{MTB}}\) matrix that transforms the individual rod dipoles to the Body frame.
User Guide#
See the example script scenarioMtbMomentumManagementSimple for an illustration on how to use this module.
Class Torque2Dipole#
-
class Torque2Dipole : public SysModel#
Top level structure for the sub-module routines.
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. Check if required input messages are connected.
- Parameters:
callTime – [ns] time the method is called
- Returns:
void
-
void updateState(uint64_t callTime) override#
This method transforms the requested torque from the torque rods into a Body frame requested dipole from the torque rods.
- Parameters:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
Public Members
-
ReadFunctor<TAMSensorBodyMsgPayload> tamSensorBodyInMsg#
[Tesla] input message for magnetic field sensor data in the Body frame
-
ReadFunctor<CmdTorqueBodyMsgPayload> tauRequestInMsg#
[N-m] input message containing control torque in the Body frame
-
Message<DipoleRequestBodyMsgPayload> dipoleRequestOutMsg#
[A-m2] output message containing dipole request in the Body frame
-
BSKLogger bskLogger = {}#
BSK Logging.
-
void reset(uint64_t callTime) override#