Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit

Permalink
Merge pull request #328 from DominicDirkx/master
Browse files Browse the repository at this point in the history
Corrected unit tests based on issue #315
  • Loading branch information
DominicDirkx authored Feb 1, 2018
2 parents 614e7dd + 22dfe24 commit 4fe13c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ BOOST_AUTO_TEST_CASE( test_ParameterPostFitResiduals )
parameterCorrections.at( 1 ).segment( 0, 6 ) - estimationOutput.second.segment( 6, 6 );
for( unsigned int index = 0; index < 3; index++ )
{
BOOST_CHECK_SMALL( std::fabs( mercuryPositionAdjustmentDifference( index ) ), 1.0E-1 );
BOOST_CHECK_SMALL( std::fabs( mercuryPositionAdjustmentDifference( index ) ), 2.0E-1 );
BOOST_CHECK_SMALL( std::fabs( mercuryPositionAdjustmentDifference( index + 3 ) ), 1.0E-7 );
BOOST_CHECK_SMALL( std::fabs( marsPositionAdjustmentDifference( index ) ), 1.0E-1 );
BOOST_CHECK_SMALL( std::fabs( marsPositionAdjustmentDifference( index + 3 ) ), 1.0E-7 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ BOOST_AUTO_TEST_CASE( testSofaFundamentalArguments )
// Compare against IERS results.
for( unsigned int i = 0; i < 5; i++ )
{
BOOST_CHECK_SMALL( expectedFundamentalArgumentValues( i ) - fundamentalArgumentValues( i ), 1.0E-13 );
BOOST_CHECK_SMALL( std::fabs( expectedFundamentalArgumentValues( i ) - fundamentalArgumentValues( i ) ), 2.0E-13 );
}

// Calculate Delaunay arguments with GMST.
Eigen::Matrix< double, 6, 1 > fundamentalArgumentValuesWithGmst =
calculateDelaunayFundamentalArgumentsWithGmst( testSecondsSinceJ2000 );
for( unsigned int i = 0; i < 5; i++ )
{
BOOST_CHECK_SMALL( fundamentalArgumentValuesWithGmst( i + 1 ) - fundamentalArgumentValues( i ), 1.0E-15 );
BOOST_CHECK_SMALL( std::fabs( fundamentalArgumentValuesWithGmst( i + 1 ) - fundamentalArgumentValues( i ) ), 1.0E-15 );
}

// Manually compute GMST
Expand All @@ -76,15 +76,15 @@ BOOST_AUTO_TEST_CASE( testSofaFundamentalArguments )
convertTTtoUTC( testSecondsSinceJ2000 ),
basic_astrodynamics::JULIAN_DAY_ON_J2000, basic_astrodynamics::iau_2006 );

BOOST_CHECK_SMALL( expectedGmst + mathematical_constants::PI - fundamentalArgumentValuesWithGmst( 0 ), 1.0E-15 );
BOOST_CHECK_SMALL( std::fabs( expectedGmst + mathematical_constants::PI - fundamentalArgumentValuesWithGmst( 0 ) ), 1.0E-15 );

// Calculate Doodson arguments directly and from Delaunay arguments and compare.
Eigen::Matrix< double, 6, 1 > doodsonArguments = calculateDoodsonFundamentalArguments( testSecondsSinceJ2000 );
Eigen::Matrix< double, 5, 1 > reconstructedFundamentalArguments =
doodsonToDelaunayArguments * doodsonArguments.segment( 1, 5 );
for( unsigned int i = 0; i < 5; i++ )
{
BOOST_CHECK_SMALL( fundamentalArgumentValues( i ) - reconstructedFundamentalArguments( i ), 1.0E-15 );
BOOST_CHECK_SMALL( std::fabs( fundamentalArgumentValues( i ) - reconstructedFundamentalArguments( i ) ), 1.0E-15 );
}
}

Expand Down

0 comments on commit 4fe13c7

Please sign in to comment.