Tudat/Astrodynamics/BasicAstrodynamics/astrodynamicsFunctions.cpp
//! Compute two-body orbital velocity with vis-viva equation.
Compute two-body orbital velocity with vis-viva equation.
Compute two - body orbital velocity with vis - viva equation .
double computeKeplerOrbitalVelocity( const Eigen::Vector6d& keplerianElements,
                                     const double gravitationalParameterOfCentralBody,
                                     const double massOfOrbitingBody )
{
    return std::sqrt( ( ( physical_constants::GRAVITATIONAL_CONSTANT * massOfOrbitingBody ) +
                        gravitationalParameterOfCentralBody ) * (
                          2.0 / computeKeplerRadialDistance( keplerianElements ) -
                          1.0 / keplerianElements[ orbital_element_conversions::semiMajorAxisIndex ] ) );
}
double computeKeplerOrbitalVelocity ( const Eigen :: Vector6d & keplerianElements , const double gravitationalParameterOfCentralBody , const double massOfOrbitingBody ) { return std :: sqrt ( ( ( physical_constants :: GRAVITATIONAL_CONSTANT * massOfOrbitingBody ) + gravitationalParameterOfCentralBody ) * ( 2.0 / computeKeplerRadialDistance ( keplerianElements ) - 1.0 / keplerianElements [ orbital_element_conversions :: semiMajorAxisIndex ] ) ) ; }
Compute two-body orbital velocity with vis-viva equation.
Compute two - body orbital velocity with vis - viva equation .