TrajectoryBetweenTwoPlanets:

Path: Interplanetary/Optimization

% Optimal 3D trajectory between two planets, fixed time (fmincon)
 Uses the JPL ephemerides. planet2 can be a number from 1-9 or a data
 structure. This stops at the target. The objective, which is minimized,
 is the total acceleration required. Generates a trajectory plot. 

 Type TrajectoryBetweenTwoPlanets for two demos: Earth to Mars using both
 JPL ephemerides, and Earth to Pluto using a data structure for planet2.
--------------------------------------------------------------------------
   Form:
   s = TrajectoryBetweenTwoPlanets( jD0, planet1, planet2, years, n, opts, nRSim )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   jD0       (1,1)  Start Julian Date
   planet1   (1,1)  Id of departure planet (1-9)
   planet2  	(1,1)  Id of arrival planet (1-9) or data structure
                    .name (1,:) Name
                    .el   (1,6) Orbital elements - epoch must be jD0
   years   	(1,1)  Mission duration (years)
   n         (1,1)  Number of steps in solution
   opts     	(.)    Data structure for fmincon
   nRSim     (1,1)  Ratio of sim points to optimization points

   -------
   Outputs
   -------
   s         (.)   Output structure      
                   .x    (6,:)  States
                   .a    (3,:)  Acceleration vector (km/s^2)
                   .jD0  (1,:)  Julian date
                   .t    (1,:)  Elapsed time (s)

--------------------------------------------------------------------------
  See also: FindDepartureDate
--------------------------------------------------------------------------

Children:

Interplanetary: Ephemeris/PlanetPosJPL
Interplanetary: Optimization/FindDepartureDate
Interplanetary: Visualization/PlanetTrajectoryPlot
Orbit: OrbitMechanics/RVOrbGen
SC: BasicOrbit/RV2El
Common: Database/Constant
Common: General/DispWithTitle
Common: Graphics/Plot2D
Common: Graphics/TimeLabl
Common: Time/Date2JD
Math: Integration/RK4
Math: Linear/Mag
Math: Linear/Unit

Back to the Interplanetary Module page