Skip to content

Commit

Permalink
Update unitTestCovariancePropagation.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicDirkx authored Sep 19, 2024
1 parent e210585 commit 57074ed
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,21 +243,21 @@ BOOST_AUTO_TEST_CASE( test_EstimationInputAndOutput )
if( test == 0 )
{
Eigen::MatrixXd manualCovariance = currentStateTransition * estimationOutput->getUnnormalizedCovarianceMatrix( ) * currentStateTransition.transpose( );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION( it.second, manualCovariance, 1.0E-15 );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION( it.second, manualCovariance, 1.0E-12 );

Eigen::Matrix3d rotationToRsw = reference_frames::getInertialToRswSatelliteCenteredFrameRotationMatrix( stateHistory.at( it.first ) );
Eigen::Matrix6d rotationToRswFull = Eigen::Matrix6d::Zero( );
rotationToRswFull.block( 0, 0, 3, 3 ) = rotationToRsw;
rotationToRswFull.block( 3, 3, 3, 3 ) = rotationToRsw;
Eigen::MatrixXd manualRswCovariance = rotationToRswFull * it.second * rotationToRswFull.transpose( );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION( rswPropagatedCovariance.at( it.first ), manualRswCovariance, 1.0E-15 );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION( rswPropagatedCovariance.at( it.first ), manualRswCovariance, 1.0E-12 );

Eigen::Matrix3d rotationToTnw = reference_frames::getInertialToTnwRotation( stateHistory.at( it.first ) );
Eigen::Matrix6d rotationToTnwFull = Eigen::Matrix6d::Zero( );
rotationToTnwFull.block( 0, 0, 3, 3 ) = rotationToTnw;
rotationToTnwFull.block( 3, 3, 3, 3 ) = rotationToTnw;
Eigen::MatrixXd manualTnwCovariance = rotationToTnwFull * it.second * rotationToTnwFull.transpose( );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION( tnwPropagatedCovariance.at( it.first ), manualTnwCovariance, 1.0E-15 );
TUDAT_CHECK_MATRIX_CLOSE_FRACTION( tnwPropagatedCovariance.at( it.first ), manualTnwCovariance, 1.0E-12 );

Eigen::VectorXd rswFormalError = rswPropagatedCovariance.at( it.first ).diagonal( ).cwiseSqrt( );
Eigen::VectorXd tnwFormalError = tnwPropagatedCovariance.at( it.first ).diagonal( ).cwiseSqrt( );
Expand Down

0 comments on commit 57074ed

Please sign in to comment.