Path: LunarMissions/Gateway
% Computes the right hand side for single gimbal CMGs
This has a built-in speed controller for the CMG wheel. It can handle
any number of CMGs but the default is three.
--------------------------------------------------------------------------
Form:
[xDot,hECI,inr] = RHSSGCMG(x,~,d)
--------------------------------------------------------------------------
------
Inputs
------
x (7+2*n) [q;omega;omegaCMG(2*n,1)]
t (1,1) Time (not used)
d (.) Data structure
.omegaS (1,1) CMG wheel setpoint
.inr (3+2*n,3+2*n) Inertia matrix (for 3 CMGs) (kg-m^2)
.inrCMG (3,3) Inertia matrix for CMG (2-axis) (kg-m^2)
.kC (1,1) Rate control gain (Nm-s)
.torque (3,1) External torque (Nm)
.tC (n,1) CMG gimbal torque (Nm)
-------
Outputs
-------
xDot (7+2*n) d[q;omega;omegaCMG(2*n,1)]/dt
hECI (3,1) ECI momentum (Nms)
inr (3+2*n,3+2*n) Inertia matrix (kg-m^2)
--------------------------------------------------------------------------
AerospaceUtils: Coord/QIToBDot Common: Quaternion/QTForm Math: Linear/Skew
Back to the LunarMissions Module page