Tudat/Astrodynamics/Aerodynamics/UnitTests/unitTestNRLMSISE00Atmosphere.cpp
//! Perform NRLMSISE-00 test 7
// Check values for 11 output parameters on against (hardcoded) values
// obtained from the similar nrlmsise-test.c program.
Perform NRLMSISE-00 test 7
Check values for 11 output parameters on against (hardcoded) values
obtained from the similar nrlmsise-test.c program.
Perform NRLMSISE - 00 test 7 Check values for 11 output parameters on against ( hardcoded ) values obtained from the similar nrlmsise - test . c program .
BOOST_AUTO_TEST_CASE( testNRLMSISE00AtmosphereTest7 )
{
    double tolerance = 1.0E-12;
    std::vector< double > verificationData = { 5.776251216023E+05, 6.979138693660E+07, 1.236813559822E+07,
            2.492867715429E+05, 1.405738674178E+03, 2.470651391663E-15,
            5.291985567067E+04, 1.069814109367E+06, 2.667273209336E+04,
            1.116385376043E+03, 1.112998568217E+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.localSolarTime = 4.0;
    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 ( testNRLMSISE00AtmosphereTest7 ) { double tolerance = 1.0E-12 ; std :: vector < double > verificationData = { 5.776251216023E+05 , 6.979138693660E+07 , 1.236813559822E+07 , 2.492867715429E+05 , 1.405738674178E+03 , 2.470651391663E-15 , 5.291985567067E+04 , 1.069814109367E+06 , 2.667273209336E+04 , 1.116385376043E+03 , 1.112998568217E+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 . localSolarTime = 4.0 ; 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 7
Check values for 11 output parameters on against (hardcoded) values
obtained from the similar nrlmsise-test.c program.
Perform NRLMSISE - 00 test 7 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