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:

Common: Database/Constant
Common: Time/JD2000
Orbit: Interplanetary/ForceSimple
Orbit: Interplanetary/GravityHelio
Orbit: Interplanetary/NoForce
SC: Ephem/PlanetPosJPL

Back to the Orbit Module page