Tudat/Astrodynamics/TrajectoryDesign/departureLegMga.cpp
void DepartureLegMga::intermediatePoints( const double maximumTimeStep,
                                          std::vector < Eigen::Vector3d >& positionVector,
                                          std::vector < double >& timeVector,
                                          const double startingTime )
{
    // Test if the trajectory has already been calculated.
    if ( std::isnan( velocityAfterDeparture_( 0 ) ) )
    {
        // If the velocity after departure has not been set yet, the trajectory has not been
        // calculated yet and hence still needs to be calculated, which is done below.
        Eigen::Vector3d tempVelocityBeforeArrivalBody;
        double tempDeltaV;
        calculateLeg( tempVelocityBeforeArrivalBody, tempDeltaV );
    }

    // Store the initial state.
    Eigen::VectorXd initialState ( 6 );
    initialState.segment( 0, 3 ) = departureBodyPosition_;
    initialState.segment( 3, 3 ) = velocityAfterDeparture_;

    // Call the trajectory return method to obtain the intermediate points along the trajectory.
    returnTrajectory( initialState, centralBodyGravitationalParameter_, timeOfFlight_,
                      maximumTimeStep, positionVector, timeVector, startingTime );
}
//! Calculate intermediate positions and their corresponding times.
Calculate intermediate positions and their corresponding times.
Calculate intermediate positions and their corresponding times .
void DepartureLegMga::intermediatePoints( const double maximumTimeStep,
                                          std::vector < Eigen::Vector3d >& positionVector,
                                          std::vector < double >& timeVector,
                                          const double startingTime )
{
    if ( std::isnan( velocityAfterDeparture_( 0 ) ) )
    {
        Eigen::Vector3d tempVelocityBeforeArrivalBody;
        double tempDeltaV;
        calculateLeg( tempVelocityBeforeArrivalBody, tempDeltaV );
    }
    Eigen::VectorXd initialState ( 6 );
    initialState.segment( 0, 3 ) = departureBodyPosition_;
    initialState.segment( 3, 3 ) = velocityAfterDeparture_;
    returnTrajectory( initialState, centralBodyGravitationalParameter_, timeOfFlight_,
                      maximumTimeStep, positionVector, timeVector, startingTime );
}
void DepartureLegMga :: intermediatePoints ( const double maximumTimeStep , std :: vector < Eigen :: Vector3d > & positionVector , std :: vector < double > & timeVector , const double startingTime ) { if ( std :: isnan ( velocityAfterDeparture_ ( 0 ) ) ) { Eigen :: Vector3d tempVelocityBeforeArrivalBody ; double tempDeltaV ; calculateLeg ( tempVelocityBeforeArrivalBody , tempDeltaV ) ; } Eigen :: VectorXd initialState ( 6 ) ; initialState . segment ( 0 , 3 ) = departureBodyPosition_ ; initialState . segment ( 3 , 3 ) = velocityAfterDeparture_ ; returnTrajectory ( initialState , centralBodyGravitationalParameter_ , timeOfFlight_ , maximumTimeStep , positionVector , timeVector , startingTime ) ; }
Calculate intermediate positions and their corresponding times.
Calculate intermediate positions and their corresponding times .
// Test if the trajectory has already been calculated. // If the velocity after departure has not been set yet, the trajectory has not been // calculated yet and hence still needs to be calculated, which is done below. // Store the initial state. // Call the trajectory return method to obtain the intermediate points along the trajectory.