FindDepartureDate:

Path: Interplanetary/Optimization

% Find the best departure date for TrajectoryBetweenTwoPlanets
 This will scan for one orbit of the departure planet (one of it's years)
 and find date with the best geometry given the desired duration. This is
 when the relative distance between the planets at the arrival date is the
 greatest, i.e. opposing sides of the orbits. This is most suitable for
 planets far from Earth where the trajectory approaches a straight line.

 For the struct form of planet2, this will calculate updated orbital
 elements for the new epoch using the gravitational parameter of the sun.
--------------------------------------------------------------------------
   Form:
   [jD,planet2] = FindDepartureDate( jD0, planet1, planet2, years )
--------------------------------------------------------------------------

   ------
   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)

   -------
   Outputs
   -------
   jD        (1,1)  Updated Julian Date
   planet2    (.)   If planet2 is a structure, updated elements
                    .name (1,:) Name
                    .el   (1,6) Orbital elements - new epoch of jD

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

Children:

Interplanetary: Ephemeris/PlanetPosJPL
Orbit: OrbitMechanics/RVOrbGen
SC: Ephem/PlanetYear
Common: Database/Constant
Common: Time/Date2JD
Common: Time/JDToDateString
Math: Linear/Mag

Back to the Interplanetary Module page