RHSPointMass:

Path: SCPro/DynamicalModels

% Spacecraft orbit dynamics with time-varying mass.
   This is a point mass with an external force input.
   The position is in km. The gravity model is for a point mass.
   The force are constant across the integration time step.
   The body has time varying mass.

   In this function d.mass is the dry mass. The fuel mass is in the state
   vector x. If m is less than zero mDot is set to zero.

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

         force = 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.

   Since version 2014.1
--------------------------------------------------------------------------
   Form:
   xDot = RHSPointMass( x, t, d )
--------------------------------------------------------------------------

   -------
   Inputs
   -------
   x       (7,1)   State vector [r;v;m] (km, km/s, kg)
   t       (1,1)	  Time (unused) (s)
   d       (1,1)	  Data structure for the simulation
                   .force    (3,1) External force (N)
                   .mass     (1,1) Vehicle dry mass (kg)
                   .mu       (1,1) Gravitational parameter (km^3/s^2)
                   .fDist    (1,:) Disturbance function handle
                   .mDot     (1,1) Mass rate (kg/s)

   -------
   Outputs
   -------
   xDot	(14,1)     d[r;v;;m]/dt

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

Children:

Math: Linear/Mag

Back to the SCPro Module page