Tudat/Astrodynamics/BasicAstrodynamics/UnitTests/unitTestConvertMeanAnomalyToEccentricAnomaly.cpp
//! Test 7: Test functionality of specifying the initial guess. Case contained in Test 2 also.
Test 7: Test functionality of specifying the initial guess. Case contained in Test 2 also.
Test 7 : Test functionality of specifying the initial guess . Case contained in Test 2 also .
BOOST_AUTO_TEST_CASE( test_convertMeanAnomalyToEccentricAnomaly_specificInitialGuess )
{
    const double testEccentricity = 0.78514;
    const double testMeanAnomaly = convertDegreesToRadians( 120.0 );
    const double referenceEccentricAnomaly = 2.5392410896466027;
    const bool useDefaultGuess = false;
    const double initialGuess = PI;
    const double eccentricAnomaly = convertMeanAnomalyToEccentricAnomaly(
                testEccentricity, testMeanAnomaly, useDefaultGuess, initialGuess );
    BOOST_CHECK_CLOSE( eccentricAnomaly,
                       referenceEccentricAnomaly,
                       1.0E-13 );
}
BOOST_AUTO_TEST_CASE ( test_convertMeanAnomalyToEccentricAnomaly_specificInitialGuess ) { const double testEccentricity = 0.78514 ; const double testMeanAnomaly = convertDegreesToRadians ( 120.0 ) ; const double referenceEccentricAnomaly = 2.5392410896466027 ; const bool useDefaultGuess = false ; const double initialGuess = PI ; const double eccentricAnomaly = convertMeanAnomalyToEccentricAnomaly ( testEccentricity , testMeanAnomaly , useDefaultGuess , initialGuess ) ; BOOST_CHECK_CLOSE ( eccentricAnomaly , referenceEccentricAnomaly , 1.0E-13 ) ; }
Test 7: Test functionality of specifying the initial guess.
Test 7 : Test functionality of specifying the initial guess .
// Set test value for eccentricity. // Set test value for mean anomaly. // Set reference value for eccentric anomaly; // Specify initial guess. // Compute eccentric anomaly. // Check if computed eccentric anomaly is less than error tolerance.