RHSGyroNBody:

Path: SCPro/DynamicalModels

% Right hand side for n bodies and a central hub with reaction wheels.
 Each of the appendages has three degrees of rotational freedom connected
 to the hub. The spacecraft also has m reaction wheels that have only
 a polar moment of inertia. The center-of-mass is assumed not to move.

 If nB is set to 1, you will get a gyrostat model. Body 1 is the core.

 Type d = RHSGyroNBody to get a default data structure for a
 one appendage, 3 orthogonal reaction wheel spacecraft.

--------------------------------------------------------------------------
   Form:
   g = RHSGyroNBody;
   [xDot, h, gInr, rhs] = RHSGyroNBody( x, t, g )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x     (7+7n+m,1)[q1;q2;q3;omega1;omega2;omega3;omegaW1;omegaW2;omegaW3]
   t     (1,1)     Time - unused
   g     (1,1)     Data structure
                 	.inr      {n+1}   n+1 3x3 inertia matrices
                   .m        (1,n+1) Masses
                   .lambda   (3,n+1) Location of the body hinge
                   .u        (3,n+1) Body n hinge unit vector
                   .rho      (3,n+1) Location of body center of mass
                  	.torque   (3,n+1) Torques
                   .nB       (1,1)   Number of appendages. [] if to be
                                     determined by the size of rho
                   .x0       (24,1)  Default state vector

   -------
   Outputs
   -------
   xDot	(7+7n+m,1) State derivative
   h   	(3,1)      Angular momentum in the inertial frame
   gInr  (:,:)      Generalized inertia
   rhs   (3+n,1)    Right hand side of the dynamical equations

--------------------------------------------------------------------------

Children:

AerospaceUtils: Coord/QIToBDot
Common: Quaternion/Q2Mat
Common: Quaternion/QTForm
Math: Linear/Skew

Back to the SCPro Module page