CubeSatDisturbanceAnalysis:

Path: CubeSat/AttitudeControl

% CubeSat disturbance analysis from batch data using RHSCubeSat. 
 Compute the drag, magnetic, gravity gradient, and optical disturbances. The
 environment is computed using AtmJ70, BDipole, and SunV1. AtmDens2
 can be used instead by supplying an empty matrix for d.atm.

 The built-in demo computes the disturbances on a 3U satellite for one day.
 The center of mass is assumed to be offset from the geometric center of the
 spacecraft by a few cm. Note the growth in momentum. the gravity gradient
 torque is zero in the demo because the attitude entered is perfect LVLH and
 the inertia is symmetric.
------------------------------------------------------------------------
   Form:
   [tT, fECI, h, hECI, f, t, powers] = CubeSatDisturbanceAnalysis( d, q, r, v, jD )
   CubeSatDisturbanceAnalysis  % demo
------------------------------------------------------------------------

   ------
   Inputs
   ------
   d        (.)      Data structure from RHSCubeSat
   q       (4,:)     Quaternion, ECI to body
   r       (3,:)     Position vector
   v       (3,:)     Velocity vector
   jD      (1,:)     Julian dates

   -------
   Outputs
   -------
   tT      (3,:)   Torque in body (Nms)
   fECI    (3,:)   Force in ECI (N)
   h       (3,:)   Body momentum (Nms)
   hECI    (3,:)   ECI momentum (Nms)
   torque   (.)    Torque structure
                     .total   (3,:)  Torque in body frame
                     .aero    (3,:)  Aerodynamic torque
                     .mag     (3,:)  Magnetic torque
                     .optical (3,:)  Optical torque
                     .gg      (3,:)  Gravity gradient torque
   force    (.)    Force structure
                    .total   (3,:)  Force in ECI frame
                    .aero    (3,:)  Aerodynamic force
                    .optical (3,:)  Optical force
   powers (1,:)   Total power from the solar cells (W)

------------------------------------------------------------------------
   See also CubeSatAero, CubeSatRadiationPressure, GravityGradientFromR,
   RHSCubeSat
------------------------------------------------------------------------

Children:

AerospaceUtils: Coord/QLVLH
CubeSat: Simulation/RHSCubeSat
SC: BasicOrbit/Period
SC: BasicOrbit/RVFromKepler
SC: Disturbances/OpticalSurfaceProperties
SC: Visualization/PlotPlanet
Common: GUIs/Figui
Common: Graphics/AxesCart
Common: Graphics/Plot2D
Common: Graphics/Plot3D
Common: Graphics/TimeLabl
Common: Quaternion/AU2Q
Common: Quaternion/QMult
Common: Quaternion/QTForm
Common: Time/Date2JD
Math: Linear/Mag

Back to the CubeSat Module page