RHSRigidBody:

Path: SC/Dynamics

% Spacecraft attitude and orbit dynamics with a disturbance function.
   This is a rigid body with an external force and torque input.
   The position is in km. The gravity model is for a point mass.
   The force and torque area constant across the integration time step.

   The function fDist (which should be a pointer) is of the form

   [force, torque] = MyFun( x, t, d )

   You can add additional fields to d. force must be in N in the body 
   frame and torque in Nm in the body frame. This function allows you
   to add forces and torques within the integration loop. This is
   required for forces and torques that are functions of time or the
   state vector.

--------------------------------------------------------------------------
   Form:
   xDot = RHSRigidBody( x, t, d )
--------------------------------------------------------------------------

   -------
   Inputs
   -------
   x       (:,1)	State vector [r;v;q;w] (km,km/s,,rad/s)
   t       (1,1)	Time (unused) (s)
   d       (1,1)	Data structure for the simulation
                   .torque   (3,1) External torque (Nm)
                   .force    (3,1) External force (N)
                   .inertia  (3,3) Vehicle inertia (kg-m^2)
                   .mass     (1,1) Vehicle mass (kg)
                   .mu       (1,1) Gravitational parameter (km^3/s^2)
                   .fDist    (1,:) Disturbance function pointer

   -------
   Outputs
   -------
   xDot	(:,1)     d[r;v;q;w]/dt

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

Children:

AC: ACData/ACTConstants
AerospaceUtils: Coord/QIToBDot
SC: SCData/sCTConstants
Common: CommonData/Constants
Common: CommonData/xSplashSmall
Common: Control/C2DZOH
Common: Database/Constant
Common: General/DeleteCell
Common: Quaternion/QTForm
Math: Linear/Mag
Math: Linear/Skew
Math: Linear/SkewSymm

Back to the SC Module page