RHSGyrostat:

Path: SCPro/DynamicalModels

% Gyrostat right-hand-side.

 This has all of the parameters in a data structure. The states
 field includes suggested state names for a gyrostat with 3 wheels. It
 also includes a usable initial state assuming 3 wheels.

 The built in friction model is a smooth model of the form:

 f = coulomb/(1+exp(-kCoulomb*omega)) - damping*omega

 d.torque should include all external torques. If you want to include
 back emf you can include it in the Friction model.

 See also FGs and GSModel.

--------------------------------------------------------------------------
   Form:
   d     = RHSGyrostat
   [xDot,hECI] = RHSGyrostat( x, ~, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x     (7+n,1)	The state vector [q;omega;omegaWheel]
   t     (1,1)   Time (s) (not used)
   d     (.)     Data structure
                 .inr          (3,3)   Inertia (kg-m^2)
                 .torque       (3,1)   Torque in body frame (Nm)
                 .inrWheel     (3,n)   Wheel inertia (kg-m^2)
                 .uWheel       (3,n)   Wheel unit vectors
                 .torqueWheel	(1,n)   Wheel control torque (Nm)
                 .funFriction  (1,1)   Pointer to friction function
                 .dFriction    (.)     Data structure for friction model
                 .x0           (10,1) Suggested initial state (3 wheels)
                 .states       {:}     State names (names for 3 wheels)

   -------
   Outputs
   -------
   xDot  (7+n,1)	The derivative of the state vector
   hECI  (3,1)   ECI momentum (Nm)

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

Children:

AerospaceUtils: Coord/QIToBDot
Common: Quaternion/QTForm
Math: Linear/Cross

Back to the SCPro Module page