Tudat/Astrodynamics/TrajectoryDesign/departureLegMga.cpp
//! Calculate the leg and update the Delta V and the velocity before the next body.
Calculate the leg and update the Delta V and the velocity before the next body.
Calculate the leg and update the Delta V and the velocity before the next body .
void DepartureLegMga::calculateLeg( Eigen::Vector3d& velocityBeforeArrivalBody,
                                    double& deltaV )
{
    mission_segments::solveLambertProblemIzzo( departureBodyPosition_, arrivalBodyPosition_,
                                               timeOfFlight_, centralBodyGravitationalParameter_,
                                               velocityAfterDeparture_, velocityBeforeArrivalBody );
    escapeDeltaV_ = mission_segments::computeEscapeOrCaptureDeltaV( departureBodyGravitationalParameter_,
                                                                    semiMajorAxis_, eccentricity_,
                                                                    ( velocityAfterDeparture_ -
                                                                      departureBodyVelocity_ ).norm( ) );
    if( includeDepartureDeltaV_ )
    {
        deltaV_ = escapeDeltaV_;
    }
    else
    {
        deltaV_ = 0.0;
    }
    deltaV = deltaV_;
}
void DepartureLegMga :: calculateLeg ( Eigen :: Vector3d & velocityBeforeArrivalBody , double & deltaV ) { mission_segments :: solveLambertProblemIzzo ( departureBodyPosition_ , arrivalBodyPosition_ , timeOfFlight_ , centralBodyGravitationalParameter_ , velocityAfterDeparture_ , velocityBeforeArrivalBody ) ; escapeDeltaV_ = mission_segments :: computeEscapeOrCaptureDeltaV ( departureBodyGravitationalParameter_ , semiMajorAxis_ , eccentricity_ , ( velocityAfterDeparture_ - departureBodyVelocity_ ) . norm ( ) ) ; if ( includeDepartureDeltaV_ ) { deltaV_ = escapeDeltaV_ ; } else { deltaV_ = 0.0 ; } deltaV = deltaV_ ; }
Calculate the leg and update the Delta V and the velocity before the next body.
Calculate the leg and update the Delta V and the velocity before the next body .
// Calculate and set the spacecraft velocities after departure and before arrival. // The deltaV is calculated using the escape and capture module. // Return the deltaV