Tudat/Astrodynamics/Gravitation/basicSolidBodyTideGravityFieldVariations.cpp
//! Calculates basic solid body gravity field corrections due to single body.

Calculates basic solid body gravity field corrections due to single body.
Calculates basic solid body gravity field corrections due to single body .
void BasicSolidBodyTideGravityFieldVariations::addBasicSolidBodyTideCorrections(
        Eigen::MatrixXd& cTermCorrections,
        Eigen::MatrixXd& sTermCorrections )
{
    radiusRatioPower = radiusRatio * radiusRatio * radiusRatio;
    currentCosineCorrections_.setZero( );
    currentSineCorrections_.setZero( );
    std::complex< double > stokesCoefficientCorrection( 0.0, 0.0 );
    for( unsigned int n = 2; n < loveNumbers_.size( ) + 2; n++ )
    {
        for( unsigned int m = 0; ( m <= n && m < loveNumbers_.at( n - 2 ).size( ) ); m++ )
        {
            updateTidalAmplitudeAndArgument( n, m );
            stokesCoefficientCorrection =
                    calculateSolidBodyTideSingleCoefficientSetCorrectionFromAmplitude(
                        loveNumbers_[ n - 2 ][ m ], massRatio, radiusRatioPower, tideAmplitude,
                    tideArgument, n, m );
            currentCosineCorrections_( n - 2, m ) += stokesCoefficientCorrection.real( );
            if( m != 0 )
            {
                currentSineCorrections_( n - 2, m ) -= stokesCoefficientCorrection.imag( );
            }
        }
        radiusRatioPower *= radiusRatio;
    }
    cTermCorrections.block( 0, 0, maximumDegree_ - minimumDegree_ + 1, maximumOrder_  - minimumOrder_ + 1 ) +=
            currentCosineCorrections_;
    sTermCorrections.block( 0, 0, maximumDegree_ - minimumDegree_ + 1, maximumOrder_  - minimumOrder_ + 1 ) +=
            currentSineCorrections_;
}
void BasicSolidBodyTideGravityFieldVariations :: addBasicSolidBodyTideCorrections ( Eigen :: MatrixXd & cTermCorrections , Eigen :: MatrixXd & sTermCorrections ) { radiusRatioPower = radiusRatio * radiusRatio * radiusRatio ; currentCosineCorrections_ . setZero ( ) ; currentSineCorrections_ . setZero ( ) ; std :: complex < double > stokesCoefficientCorrection ( 0.0 , 0.0 ) ; for ( unsigned int n = 2 ; n < loveNumbers_ . size ( ) + 2 ; n ++ ) { for ( unsigned int m = 0 ; ( m <= n && m < loveNumbers_ . at ( n - 2 ) . size ( ) ) ; m ++ ) { updateTidalAmplitudeAndArgument ( n , m ) ; stokesCoefficientCorrection = calculateSolidBodyTideSingleCoefficientSetCorrectionFromAmplitude ( loveNumbers_ [ n - 2 ] [ m ] , massRatio , radiusRatioPower , tideAmplitude , tideArgument , n , m ) ; currentCosineCorrections_ ( n - 2 , m ) += stokesCoefficientCorrection . real ( ) ; if ( m != 0 ) { currentSineCorrections_ ( n - 2 , m ) -= stokesCoefficientCorrection . imag ( ) ; } } radiusRatioPower *= radiusRatio ; } cTermCorrections . block ( 0 , 0 , maximumDegree_ - minimumDegree_ + 1 , maximumOrder_ - minimumOrder_ + 1 ) += currentCosineCorrections_ ; sTermCorrections . block ( 0 , 0 , maximumDegree_ - minimumDegree_ + 1 , maximumOrder_ - minimumOrder_ + 1 ) += currentSineCorrections_ ; }
Calculates basic solid body gravity field corrections due to single body.
Calculates basic solid body gravity field corrections due to single body .
//    // Initialize power of radiusRatio^(N+1) (calculation starts at N=2)
 //    // Iterate over all love
 // Calculate and add coefficients.
 // Increment radius ratio power.
