Tudat/Astrodynamics/Aerodynamics/UnitTests/unitTestNRLMSISE00Atmosphere.cpp
//! Perform NRLMSISE-00 test 20
// Check computation mean free path
Perform NRLMSISE-00 test 20
Check computation mean free path
Perform NRLMSISE - 00 test 20 Check computation mean free path
BOOST_AUTO_TEST_CASE( testMeanFreePath )
{
    NRLMSISE00Atmosphere model( std::bind( &function, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, false, false ) );
    double altitude = 20.0E3 ;
    double longitude = 0.5 ;
    double latitude = 0.2 ;
    double time = 1.0E5 ;
    double meanFreePath = std::sqrt(2.0) * PI * std::pow( model.getWeightedAverageCollisionDiameter(altitude,longitude,latitude,time) , 2.0)
            * model.getAverageNumberDensity(altitude,longitude,latitude,time) ;
    meanFreePath = std::pow( meanFreePath , (-1.0) );
    BOOST_CHECK_CLOSE_FRACTION( model.getMeanFreePath(altitude,longitude,latitude,time) , meanFreePath , 1.0E-15 );
    altitude = 0.0E3 ;
    BOOST_CHECK_CLOSE_FRACTION( model.getMeanFreePath(altitude,longitude,latitude,time) , 1.0E-7 , 10.0 );
    altitude = 60.0E3 ;
    BOOST_CHECK_CLOSE_FRACTION( model.getMeanFreePath(altitude,longitude,latitude,time) , 1.0E-3 , 1.2 );
    altitude = 300.0E3 ;
    BOOST_CHECK_CLOSE_FRACTION( model.getMeanFreePath(altitude,longitude,latitude,time) , 1.0E4 , 0.9 );
}
BOOST_AUTO_TEST_CASE ( testMeanFreePath ) { NRLMSISE00Atmosphere model ( std :: bind ( & function , std :: placeholders :: _1 , std :: placeholders :: _2 , std :: placeholders :: _3 , std :: placeholders :: _4 , false , false ) ) ; double altitude = 20.0E3 ; double longitude = 0.5 ; double latitude = 0.2 ; double time = 1.0E5 ; double meanFreePath = std :: sqrt ( 2.0 ) * PI * std :: pow ( model . getWeightedAverageCollisionDiameter ( altitude , longitude , latitude , time ) , 2.0 ) * model . getAverageNumberDensity ( altitude , longitude , latitude , time ) ; meanFreePath = std :: pow ( meanFreePath , ( -1.0 ) ) ; BOOST_CHECK_CLOSE_FRACTION ( model . getMeanFreePath ( altitude , longitude , latitude , time ) , meanFreePath , 1.0E-15 ) ; altitude = 0.0E3 ; BOOST_CHECK_CLOSE_FRACTION ( model . getMeanFreePath ( altitude , longitude , latitude , time ) , 1.0E-7 , 10.0 ) ; altitude = 60.0E3 ; BOOST_CHECK_CLOSE_FRACTION ( model . getMeanFreePath ( altitude , longitude , latitude , time ) , 1.0E-3 , 1.2 ) ; altitude = 300.0E3 ; BOOST_CHECK_CLOSE_FRACTION ( model . getMeanFreePath ( altitude , longitude , latitude , time ) , 1.0E4 , 0.9 ) ; }
Perform NRLMSISE-00 test 20
Check computation mean free path
Perform NRLMSISE - 00 test 20 Check computation mean free path
// Construct model with default properties // Verify calculation // Verify using data - Logarithmic plot: physics of the Earth's space environment, Gerd W. Prolls (page 29) // Test using approximate values obtained from figure