Disturbances:

Path: SC/Disturbances

% Compute the total force and torque on a spacecraft generated by the CAD package. 
 Environment inputs are given in e.

 The number of points generated will equal the length of the longest
 transformation matrix in g or the longest member of e. If the number of
 points is > 1 all other members of e and transformation matrices in g
 must equal that number or 1.

 The optical input is a flux vector with magnitude in watts.
 The aerodynamic and optical computations optionally use shadowing.
 To get shadowing you must enter the shadow and scanLines fields.
 Planetary radiation assumes that the optical coefficients are zero
 except for the diffuse coefficient which is 1. 
 
 The defaults are:
    - AtmDens2 for the Earth, if atmosphericDensity is not entered
    - AtmDens1 for the other planets, if atmosphericDensity is not entered
    - Constant(['bond albedo ',e.planet]) for albedo fraction, if not entered
    - Constant(['mu ',e.planet]) for mu, if not entered
    - Constant(['equatorial radius ',e.planet]), if planetRadius not entered
    - Constant(['black body radiation ',e.planet]) if radiation is not entered
    - No aerodynamic disturbances unless v is entered
    - No planetary radiation unless r is entered
    - Flags computeAero and computePR override defaults
    - No shadowing
    - No scan display and 0 scanLines
    - No plots

   The output units are determined by e.units as follows:

   e.units        force      torque
   -------        -----      ------
   'm'            N          Nm
   'in'           lbf        in-lbf
   'ft'           lbf        ft-lbf

   Your first call
      h = Disturbances( 'init', g, e );
   This returns a handle, h, to the display. You can then call this 
     [f, t, m, harm, angMom] = Disturbances( 'run', g, e, h, doPlots )  
   multiple times.

--------------------------------------------------------------------------
   Forms:
   e = Disturbances( 'defaults' )
   h = Disturbances( 'init', g, e )
   [f, t, m, harm, angMom] = Disturbances( 'run', g, e, h, doPlots )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   mode     ''     'init', 'defaults' or 'run'
   g       (.)     Spacecraft data structure
   e       (.)     Disturbances data structure
                    .units              (1,:) 'm', 'in', 'ft'
                    .r                  (3,:) Distance from gravity center (km)
                    .v                  (3,:) Velocity vector in the inertial frame (km/sec)
                                              - should include planetary rotation
                    .s                  (3,:) Solar optical radiation flux vector (watts)
                    .b                  (3,:) Magnetic field vector (T)
                    .planet             (1,:) Will compute density and mu for various
                                              planets
                    .planetRadius*       (1,:) Radius of the planet (km)
                    .atmosphericDensity* (1,:) Density
                    .mu*                 (1,1) Gravitational parameter (km^3/sec^2)
                    .albedo*             (1,1) Albedo fraction
                    .radiation*          (1,1) Planet radiation (W/m^2)
                                               * looked up by planet if not entered or 0
                    .tGas               (1,1) Gas temperature (deg-K)
                    .mGas               (1,1) Gas molecular weight (kg/mol)
                    .tSamp              (1,1) Sample time between transformation matrices in g or
                                              (1,:) time vector if irregular
                    .shadow             (1,1) 1 for on, 0 for off - optical/thermal
                    .nScanLines         (1,1) Number of scan lines for shadowing
                    .showScans          (1,1) True means show the HSRCAD scan display
                    .computeAero**      (1,1) True means compute aerodynamic torques
                    .computePR**        (1,1) True means compute planetary radiation torques
                    .computeRF**        (1,1) True means compute RF torques
                    .computeGG**        (1,1) True means compute gravity gradient torques
                    .computeMag**       (1,1) True means compute magnetic torques
                                                  ** optional fields
   h        (1)     Handle to display
   doPlots  (1)     If true, will plot outputs

   -------
   Outputs
   -------
   f         (:)    Force structure or handle to display if mode is 'init'
                    .total    (3,:)   Force in ECI frame
                    .aero             Aerodynamic
                    .optical          Optical
                    .thermal          Thermal
                    .rF               Radio Frequency
                    .pR               Planetary radiation
                    .al               Planetary albedo
   t         (:)    Torque structure  
                    .total   (3,:)   Torque in body frame
                    .aero
                    .magnetic
                    .optical
                    .thermal
                    .rF
                    .pR
                    .al
                    .gravityGradient
   m         (:)    Mass properties
                    .mass
                    .inertia
                    .cM

   harm      (:)    Harmonic coefficients
                    .wf(3,:) Harmonic frequencies for force
									   .wt(3,:) Harmonic frequencies for torque     
                    .f (3,:) Harmonic coefficents
                              .sin
                              .cos
                              .dC
                    .t (3,:) Harmonic coefficents
                              .sin
                              .cos
                              .dC
   angMom   (:)    Angular momentum
                   .eCI  (3,:) In the inertial frame
                   .body (3,:) In the body frame

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

Children:

AerospaceUtils: AtmosphericCalculations/AtmDens1
AerospaceUtils: AtmosphericCalculations/AtmDens2
AerospaceUtils: CAD/BHinge
AerospaceUtils: CAD/HSRCAD
SC: BasicOrbit/VOrbit
SC: Disturbances/FAeroSurfaceAccommodation
SC: Environs/MagField
SC: Environs/SolarFlx
SC: Ephem/SunV1
Common: Database/Constant
Common: GUIs/Figui
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/TimeLabl
Common: Time/JD2000
Math: Analysis/FourierSeries
Math: Linear/Cross
Math: Linear/Dot
Math: Linear/DupVect
Math: Linear/Mag
Math: Linear/SkewSq
Math: Linear/Unit

Back to the SC Module page