RHSLunarMission:

Path: CubeSat/Simulation

% Right hand side for orbit and attitude dynamics for a lunar mission simulation.

 Includes solar disturbances and the power model. Any number of reaction wheels
 can be simulated. Reaction wheels are optional. It also includes states for
 the IMU (gyro and accelerometer) bias.

 * The gravity model includes the Earth, Sun and the Moon.
   The Moon gravity model can have spherical harmonics.
 * The solar power model includes eclipses due to the Moon and Earth
   but not self-shadowing.

 You can select the Moon or Earth as the coordinate center for orbit
 propagation. Get the default data structure by typing:

   d = RHSLunarMission

 Set up the state name output by typing:

   RHSLunarMission( x );

 You must initialize the JPL ephemerides prior to using this function.
 Type:

   PlanetPosJPL( 'initialize', [0 3 10] );

--------------------------------------------------------------------------
   Forms:
           d = RHSLunarMission;            % data structure
               RHSLunarMission( x );       % initialize persistent variables
   [xDot, p] = RHSLunarMission( x, t, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x     (:,1)   State [rECI;vECI;qECIToBody;omega;massFuel;pBattery;
                        iMUBiasAccel;iMUBiasGyro;omegaRWA]
   t     (1,1)   Time
   d     (.)     Data structure
                      .jD0        (1,1) Julian date of epoch
                      .mass       (1,1) Spacecraft mass (kg)
                      .inertia    (3,3) Spacecraft inertia (kg-m2)
                      .power       (.)  Power data, see SolarCellPower 
                      .opticalModel * Handle, see CubeSatRadiationPressure
                      .surfData    (.)  optional; empty to skip optical calcs
                      .thruster    (.)
                      .rWA         (.)
                      .iMU         (.)
                      .gravity     (.)
                      .forceBody  (3,1) Body forces (N)
                      .torqueBody (3,1) Body torques (Nm)

   -------
   Outputs
   -------
   xDot  (:,1)   dx/dt
   p     (.)     Data structure with internally computed variables

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

Children:

AC: ACData/ACTConstants
AerospaceUtils: AtmosphericCalculations/AtmDens2
AerospaceUtils: AtmosphericCalculations/AtmJ70
AerospaceUtils: AtmosphericCalculations/BaromExp
AerospaceUtils: AtmosphericCalculations/DiffusionExp
AerospaceUtils: Coord/ECIToEF
AerospaceUtils: Coord/QIToBDot
AerospaceUtils: Coord/QLVLH
AerospaceUtils: Coord/R2LatLon
CubeSat: AttitudeControl/InertiaCubeSat
CubeSat: Power/SolarCellPower
CubeSat: Simulation/CubeSatAero
CubeSat: Simulation/CubeSatEnvironment
CubeSat: Simulation/CubeSatLunarEnvironment
CubeSat: Simulation/CubeSatRadiationPressure
CubeSat: Simulation/RHSCubeSat
CubeSat: Utilities/CubeSatAttitude
CubeSat: Utilities/CubeSatFaces
CubeSat: Utilities/CubeSatModel
CubeSat: Visualization/DrawCubeSat
CubeSat: Visualization/GroundTrack
Orbit: OrbitCoord/ConvertNORAD
Orbit: OrbitCoord/SLR
Orbit: OrbitMechanics/APlanet
Orbit: OrbitMechanics/NORAD
Orbit: OrbitMechanics/NORADToEl
Orbit: OrbitMechanics/PropagateTLE
Orbit: OrbitMechanics/RVOrbGen
Orbit: Visualization/OrbTrack
SC: BasicOrbit/CP2I
SC: BasicOrbit/E2M
SC: BasicOrbit/E2Nu
SC: BasicOrbit/El2RV
SC: BasicOrbit/M2E
SC: BasicOrbit/M2EApp
SC: BasicOrbit/M2EEl
SC: BasicOrbit/M2EHy
SC: BasicOrbit/M2Nu
SC: BasicOrbit/M2NuPb
SC: BasicOrbit/Nu2E
SC: BasicOrbit/Nu2M
SC: BasicOrbit/Period
SC: BasicOrbit/RV2El
SC: BasicOrbit/RVFromKepler
SC: Disturbances/GravityGradientFromR
SC: Disturbances/SolarF
SC: Environs/BDipole
SC: Environs/SolarFluxPrediction
SC: Ephem/CEcl2Eq
SC: Ephem/ECIToPlanet
SC: Ephem/EOfE
SC: Ephem/EarthNut
SC: Ephem/EarthPre
SC: Ephem/EarthRot
SC: Ephem/EarthRte
SC: Ephem/Eclipse
SC: Ephem/GMSTime
SC: Ephem/InterpolateState
SC: Ephem/MSidDay
SC: Ephem/MoonRot
SC: Ephem/Moons
SC: Ephem/NutDelta
SC: Ephem/ObOfE
SC: Ephem/PlanetPosJPL
SC: Ephem/SunV1
SC: Ephem/TruEarth
SC: SCData/bin2000
SC: SCData/sCTConstants
SC: SCMat/EarthMR
SC: SCMat/SolarFluxPredictions
SC: Visualization/PlotPlanet
SCPro: MannedVehicle/ISSOrbit
Common: CommonData/Constants
Common: CommonData/SwooshWatermark
Common: CommonData/xSplashSmall
Common: ComponentModels/Box
Common: Control/C2DZOH
Common: Database/Constant
Common: FileUtils/FindDirectory
Common: General/CellToMat
Common: General/DeBlankLT
Common: General/DeleteCell
Common: General/DispWithTitle
Common: General/MatToCell
Common: General/Watermark
Common: Graphics/AddFillToPlots
Common: Graphics/Axis3D
Common: Graphics/DrawVertices
Common: Graphics/Ellipsd
Common: Graphics/Map
Common: Graphics/Mesh2
Common: Graphics/NPlot
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/Plot3D
Common: Graphics/PltStyle
Common: Graphics/TimeLabl
Common: Graphics/TitleS
Common: Graphics/XLabelS
Common: Graphics/YLabelS
Common: Graphics/ZLabelS
Common: MassProperties/AddMass
Common: MassProperties/IC623X3
Common: MassProperties/Inertias
Common: Quaternion/Mat2Q
Common: Quaternion/QForm
Common: Quaternion/QMult
Common: Quaternion/QTForm
Common: Time/DTAToDTS
Common: Time/DTSToDTA
Common: Time/Date2DN
Common: Time/Date2JD
Common: Time/JD2000
Common: Time/JD2Array
Common: Time/JD2DN
Common: Time/JD2Date
Common: Time/JD2T
Common: Time/JDToMidnight
Common: Time/T2JD
Math: Linear/Cross
Math: Linear/Dot
Math: Linear/DupVect
Math: Linear/Mag
Math: Linear/Skew
Math: Linear/SkewSq
Math: Linear/SkewSymm
Math: Linear/Unit
Math: MathUtils/R2P5
Math: Trigonometry/ACosD
Math: Trigonometry/CosD
Math: Trigonometry/SinD

Back to the CubeSat Module page