Tudat/Astrodynamics/OrbitDetermination/AccelerationPartials/sphericalHarmonicAccelerationPartial.cpp
//! Function to calculate an acceleration partial wrt a rotational parameter.
Function to calculate an acceleration partial wrt a rotational parameter.
Function to calculate an acceleration partial wrt a rotational parameter .
void SphericalHarmonicsGravityPartial::wrtRotationModelParameter(
        Eigen::MatrixXd& accelerationPartial,
        const estimatable_parameters::EstimatebleParametersEnum parameterType,
        const std::string& secondaryIdentifier )
{
    Eigen::Vector3d distanceVector = positionFunctionOfAcceleratedBody_( ) - positionFunctionOfAcceleratingBody_( );
    std::vector< Eigen::Matrix3d > rotationMatrixPartials =
            rotationMatrixPartials_.at( std::make_pair( parameterType, secondaryIdentifier ) )->
            calculatePartialOfRotationMatrixToBaseFrameWrParameter( currentTime_ );
    for( unsigned int i = 0; i < rotationMatrixPartials.size( ); i++ )
    {
        accelerationPartial.block( 0, i, 3, 1 ) = rotationMatrixPartials[ i ] *
                ( fromBodyFixedToIntegrationFrameRotation_( ).inverse( ) ) * accelerationFunction_( ) +
                fromBodyFixedToIntegrationFrameRotation_( ) * currentBodyFixedPartialWrtPosition_*
                rotationMatrixPartials[ i ].transpose( ) * distanceVector;
    }
}
void SphericalHarmonicsGravityPartial :: wrtRotationModelParameter ( Eigen :: MatrixXd & accelerationPartial , const estimatable_parameters :: EstimatebleParametersEnum parameterType , const std :: string & secondaryIdentifier ) { Eigen :: Vector3d distanceVector = positionFunctionOfAcceleratedBody_ ( ) - positionFunctionOfAcceleratingBody_ ( ) ; std :: vector < Eigen :: Matrix3d > rotationMatrixPartials = rotationMatrixPartials_ . at ( std :: make_pair ( parameterType , secondaryIdentifier ) ) -> calculatePartialOfRotationMatrixToBaseFrameWrParameter ( currentTime_ ) ; for ( unsigned int i = 0 ; i < rotationMatrixPartials . size ( ) ; i ++ ) { accelerationPartial . block ( 0 , i , 3 , 1 ) = rotationMatrixPartials [ i ] * ( fromBodyFixedToIntegrationFrameRotation_ ( ) . inverse ( ) ) * accelerationFunction_ ( ) + fromBodyFixedToIntegrationFrameRotation_ ( ) * currentBodyFixedPartialWrtPosition_ * rotationMatrixPartials [ i ] . transpose ( ) * distanceVector ; } }
Function to calculate an acceleration partial wrt a rotational parameter.
Function to calculate an acceleration partial wrt a rotational parameter .
// Calculate distance vector between bodies. // Get rotation matrix partial(s) wrt requested parameter // Iterate for each single parameter entry partial. // Calculate acceleration partial for current parameter entry.