Module: rateServoFullNonlinear¶
This module implements a nonlinear rate servo control uses the attiude steering message and determine the ADCS control torque vector.
The module
PDF Description
contains further information on this module’s function,
how to run it, as well as testing.
Functions
-
void
SelfInit_rateServoFullNonlinear
(rateServoFullNonlinearConfig *configData, int64_t moduleID)¶ This method initializes the configData for this module. It creates the output message CmdTorqueBodyIntMsg.
- Return
void
- Parameters
configData
: The configuration data associated with this module
-
void
CrossInit_rateServoFullNonlinear
(rateServoFullNonlinearConfig *configData, int64_t moduleID)¶ This method performs the second stage of initialization for this module. Its primary function is to link the input messages that were created elsewhere. The required input messages are the attitude tracking error message of type AttGuidFswMsg the vehicle configuration message of type VehicleConfigFswMsg, and the rate command message of type RateCmdFswMsg. Optional messages are the RW configuration message of type RWArrayConfigFswMsg, the RW speed message of type RWSpeedIntMsg and the RW availability message of type RWAvailabilityFswMsg.
- Return
void
- Parameters
configData
: The configuration data associated with this module
-
void
Update_rateServoFullNonlinear
(rateServoFullNonlinearConfig *configData, uint64_t callTime, int64_t moduleID)¶ This method takes and rate errors relative to the Reference frame, as well as the reference frame angular rates and acceleration, and computes the required control torque Lr.
- Return
void
- Parameters
configData
: The configuration data associated with the servo rate controlcallTime
: The clock time at which the function was called (nanoseconds)
-
void
Reset_rateServoFullNonlinear
(rateServoFullNonlinearConfig *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.
- Return
void
- Parameters
configData
: The configuration data associated with the servo rate control
-
struct
rateServoFullNonlinearConfig
¶ - #include <rateServoFullNonlinear.h>
The configuration structure for the rateServoFullNonlinear module.
Public Members
-
double
P
¶ [N*m*s] Rate error feedback gain applied
-
double
Ki
¶ [N*m] Integration feedback error on rate error
-
double
knownTorquePntB_B
[3]¶ [N*m] known external torque in body frame vector components
-
double
integralLimit
¶ [N*m] Integration limit to avoid wind-up issue
-
uint64_t
priorTime
¶ [ns] Last time the attitude control is called
-
double
z
[3]¶ [rad] integral state of delta_omega
-
double
ISCPntB_B
[9]¶ [kg m^2] Spacecraft Inertia
-
RWArrayConfigFswMsg
rwConfigParams
¶ [-] struct to store message containing RW config parameters in body B frame
-
char
rwParamsInMsgName
[MAX_STAT_MSG_LENGTH
]¶ The name of the RWArrayConfigFswMsg input message.
-
int32_t
rwParamsInMsgId
¶ [-] ID for the RWArrayConfigFswMsg ingoing message
-
char
vehConfigInMsgName
[MAX_STAT_MSG_LENGTH
]¶
-
int32_t
vehConfigInMsgId
¶
-
char
rwAvailInMsgName
[MAX_STAT_MSG_LENGTH
]¶ [-] The name of the RWs availability message
-
int32_t
rwAvailInMsgId
¶ [-] ID for the incoming RWs availability data
-
char
outputDataName
[MAX_STAT_MSG_LENGTH
]¶ The name of the commanded attitude control torque output message.
-
int32_t
cmdTorqueOutMsgId
¶ [] ID for the outgoing control torque message
-
char
inputGuidName
[MAX_STAT_MSG_LENGTH
]¶ The name of the guidance input message.
-
int32_t
guidInMsgId
¶ [] ID for the incoming guidance message
-
char
inputRWSpeedsName
[MAX_STAT_MSG_LENGTH
]¶ [] The name for the reaction wheel speeds message
-
int32_t
rwSpeedsInMsgId
¶ [] The ID for the reaction wheel speeds message
-
char
inputRateSteeringName
[MAX_STAT_MSG_LENGTH
]¶ [] the name of the steering law message
-
int32_t
rateSteeringInMsgId
¶ [] ID for the incoming steering law message
-
double