Tudat/Astrodynamics/Aerodynamics/UnitTests/unitTestNRLMSISE00Atmosphere.cpp
//! Perform NRLMSISE-00 test 3
// Check values for 11 output parameters on against (hardcoded) values
// obtained from the similar nrlmsise-test.c program.
Perform NRLMSISE-00 test 3
Check values for 11 output parameters on against (hardcoded) values
obtained from the similar nrlmsise-test.c program.
Perform NRLMSISE - 00 test 3 Check values for 11 output parameters on against ( hardcoded ) values obtained from the similar nrlmsise - test . c program .
BOOST_AUTO_TEST_CASE( testNRLMSISE00AtmosphereTest3 )
{
    double tolerance = 1.0E-12;
    std::vector< double > verificationData = { 1.123767244038E+05, 6.934130086761E+04, 4.247105217477E+01,
            1.322750141475E-01, 2.618848418232E-05, 2.756772319269E-18,
            2.016749854321E+04, 5.741255934147E+03, 2.374394151990E+04,
            1.239892111717E+03, 1.239890640133E+03 };
    NRLMSISE00Atmosphere model( std::bind( &function, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, false, false ) );
    data = gen_data;
    std::vector< double > input = gen_input;
    data.secondOfTheDay = 75000.0;
    input[0]            =  1000.0E3;
    model.resetHashKey( );
    std::pair<std::vector< double >, std::vector< double > > output
            = model.getFullOutput( input[ 0 ], input[ 1 ],
            input[ 2 ], input[ 3 ] );
    for( unsigned i = 0; i < 9; i++ )
    {
        BOOST_CHECK_CLOSE_FRACTION( verificationData[ i ],
                                    output.first[ i ], tolerance );
    }
    for( unsigned i = 0; i < 2; i++ )
    {
        BOOST_CHECK_CLOSE_FRACTION( verificationData[ i + 9 ],
                output.second[ i ], tolerance );
    }
}
BOOST_AUTO_TEST_CASE ( testNRLMSISE00AtmosphereTest3 ) { double tolerance = 1.0E-12 ; std :: vector < double > verificationData = { 1.123767244038E+05 , 6.934130086761E+04 , 4.247105217477E+01 , 1.322750141475E-01 , 2.618848418232E-05 , 2.756772319269E-18 , 2.016749854321E+04 , 5.741255934147E+03 , 2.374394151990E+04 , 1.239892111717E+03 , 1.239890640133E+03 } ; NRLMSISE00Atmosphere model ( std :: bind ( & function , std :: placeholders :: _1 , std :: placeholders :: _2 , std :: placeholders :: _3 , std :: placeholders :: _4 , false , false ) ) ; data = gen_data ; std :: vector < double > input = gen_input ; data . secondOfTheDay = 75000.0 ; input [ 0 ] = 1000.0E3 ; model . resetHashKey ( ) ; std :: pair < std :: vector < double > , std :: vector < double > > output = model . getFullOutput ( input [ 0 ] , input [ 1 ] , input [ 2 ] , input [ 3 ] ) ; for ( unsigned i = 0 ; i < 9 ; i ++ ) { BOOST_CHECK_CLOSE_FRACTION ( verificationData [ i ] , output . first [ i ] , tolerance ) ; } for ( unsigned i = 0 ; i < 2 ; i ++ ) { BOOST_CHECK_CLOSE_FRACTION ( verificationData [ i + 9 ] , output . second [ i ] , tolerance ) ; } }
Perform NRLMSISE-00 test 3
Check values for 11 output parameters on against (hardcoded) values
obtained from the similar nrlmsise-test.c program.
Perform NRLMSISE - 00 test 3 Check values for 11 output parameters on against ( hardcoded ) values obtained from the similar nrlmsise - test . c program .
// Define verification data for specific test and tolerance // Create the model // Create local copy of input and define variations // Define variations from the standard case // We change parameters other than alt, lat, long, and/or time, // so it's best to reset the hash. // Get full output for current test case // Loop through output and perform tests