Tudat/Astrodynamics/OrbitDetermination/RotationalDynamicsPartials/inertialTorquePartial.cpp
//! Function to compute partial of torque w.r.t. spherical harmonic sine coefficients

Function to compute partial of torque w.r.t. spherical harmonic sine coefficients
Function to compute partial of torque w . r . t . spherical harmonic sine coefficients
void InertialTorquePartial::wrtSineSphericalHarmonicCoefficientsOfCentralBody(
        Eigen::MatrixXd& sphericalHarmonicCoefficientPartial,
        const int s21Index, const int s22Index )
{
    sphericalHarmonicCoefficientPartial.setZero( );
    if( s21Index >= 0 )
    {
        sphericalHarmonicCoefficientPartial .block( 0, s21Index, 3, 1 ) =
                - basic_mathematics::calculateLegendreGeodesyNormalizationFactor( 2, 1 ) *
                currentAngularVelocityCrossProductMatrix_ * currentInertiaTensorNormalizationFactor_ *
                UNSCALED_INERTIAL_TENSOR_PARTIAL_WRT_S21 * currentAngularVelocityVector_;
    }
    if( s22Index >= 0 )
    {
        sphericalHarmonicCoefficientPartial .block( 0, s22Index, 3, 1 ) =
                - basic_mathematics::calculateLegendreGeodesyNormalizationFactor( 2, 2 ) *
                currentAngularVelocityCrossProductMatrix_ * currentInertiaTensorNormalizationFactor_ *
                UNSCALED_INERTIAL_TENSOR_PARTIAL_WRT_S22 * currentAngularVelocityVector_;
    }
}
void InertialTorquePartial :: wrtSineSphericalHarmonicCoefficientsOfCentralBody ( Eigen :: MatrixXd & sphericalHarmonicCoefficientPartial , const int s21Index , const int s22Index ) { sphericalHarmonicCoefficientPartial . setZero ( ) ; if ( s21Index >= 0 ) { sphericalHarmonicCoefficientPartial . block ( 0 , s21Index , 3 , 1 ) = - basic_mathematics :: calculateLegendreGeodesyNormalizationFactor ( 2 , 1 ) * currentAngularVelocityCrossProductMatrix_ * currentInertiaTensorNormalizationFactor_ * UNSCALED_INERTIAL_TENSOR_PARTIAL_WRT_S21 * currentAngularVelocityVector_ ; } if ( s22Index >= 0 ) { sphericalHarmonicCoefficientPartial . block ( 0 , s22Index , 3 , 1 ) = - basic_mathematics :: calculateLegendreGeodesyNormalizationFactor ( 2 , 2 ) * currentAngularVelocityCrossProductMatrix_ * currentInertiaTensorNormalizationFactor_ * UNSCALED_INERTIAL_TENSOR_PARTIAL_WRT_S22 * currentAngularVelocityVector_ ; } }
Function to compute partial of torque w.r.t.
Function to compute partial of torque w . r . t .