RHSTrajectory:

Path: Orbit/Interplanetary

% Right-Hand-Side function for solar system object trajectories

 You must initialize the JPL ephemerides before running this function.

 PlanetPosJPL( 'initialize', planets  );

 Planets contains the JPL ephemeris ids from 1 to 11.

 The force model must be of the form f = ForceModel( r, v, d )
 where d can be any data structure. 
 f is the force vector in N in the ECI frame.
--------------------------------------------------------------------------
   Form:
      d        = RHSTrajectory;            % Get the default data structure
                 RHSTrajectory( x );       % initialize persistent variables
     [xDot, p] = RHSTrajectory( x, t, d ); % Call during simulation
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x     (6*n,1) State [r;v] for n bodies
   t     (1,1)   Time since start date
   d     (.)     Date 
                 .jD0      (1,1) Julian date at start
                 .mu       (1,1) Sun gravitational parameter
                 .planets  (1,:) Planet IDs.
                 .object   (:)   Data structures for object
                                 .mass          	(1,1) Mass
                                 .forceModel    	(.)	  Force model structure
                                 .gravity        (.)   Gravity model structure
                                 .cM             (3,1) Center of mass
   -------
   Outputs
   -------
   xDot  (6*n,:) State derivative d[r;v]/dt
   p     {}      Auxiliary outputs

--------------------------------------------------------------------------
   See also: PlanetPosJPL, ForceSimple, GravityHelio, NoForce
--------------------------------------------------------------------------

Children:

AC: ACData/ACTConstants
Orbit: GravityModels/LoadGEM
Orbit: GravityModels/NormalizationMatrix
Orbit: Interplanetary/ForceSimple
Orbit: Interplanetary/GravityHelio
Orbit: Interplanetary/NoForce
Orbit: OrbitMechanics/AGravityC
Orbit: OrbitMechanics/APlanet
SC: Ephem/CEcl2Eq
SC: Ephem/InterpolateState
SC: Ephem/MoonRot
SC: Ephem/PlanetPosJPL
SC: SCData/bin2000
SC: SCData/sCTConstants
SC: SCMat/GEMT1
Common: CommonData/Constants
Common: CommonData/SwooshWatermark
Common: CommonData/xSplashSmall
Common: Database/Constant
Common: General/CellToMat
Common: General/DeBlankLT
Common: General/DeleteCell
Common: General/DispWithTitle
Common: General/MatToCell
Common: General/Watermark
Common: Graphics/Mesh2
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/PltStyle
Common: Graphics/XLabelS
Common: Graphics/YLabelS
Common: Graphics/ZLabelS
Common: Time/DTSToDTA
Common: Time/Date2JD
Common: Time/JD2000
Math: Linear/DupVect
Math: Linear/Factorl
Math: Linear/Mag

Back to the Orbit Module page