Tudat/Astrodynamics/Gravitation/basicSolidBodyTideGravityFieldVariations.cpp
//! Function for calculating spherical harmonic coefficient corrections.

Function for calculating spherical harmonic coefficient corrections.
Function for calculating spherical harmonic coefficient corrections .
std::pair< Eigen::MatrixXd, Eigen::MatrixXd > BasicSolidBodyTideGravityFieldVariations::
calculateBasicSphericalHarmonicsCorrections(
        const double time )
{
    Eigen::MatrixXd cTermCorrections = Eigen::MatrixXd::Zero( numberOfDegrees_, numberOfOrders_ );
    Eigen::MatrixXd sTermCorrections = Eigen::MatrixXd::Zero( numberOfDegrees_, numberOfOrders_ );
    for( unsigned int i = 0; i < deformingBodyStateFunctions_.size( ); i++ )
    {
        setBodyGeometryParameters( i, time );
        massRatio = deformingBodyMasses_[ i ]( ) / deformedBodyMass_( );
        for( unsigned int j = 0; j < correctionFunctions.size( ); j++ )
        {
            correctionFunctions[ j ]( cTermCorrections, sTermCorrections );
        }
    }
    return std::make_pair( cTermCorrections, sTermCorrections );
}
std :: pair < Eigen :: MatrixXd , Eigen :: MatrixXd > BasicSolidBodyTideGravityFieldVariations :: calculateBasicSphericalHarmonicsCorrections ( const double time ) { Eigen :: MatrixXd cTermCorrections = Eigen :: MatrixXd :: Zero ( numberOfDegrees_ , numberOfOrders_ ) ; Eigen :: MatrixXd sTermCorrections = Eigen :: MatrixXd :: Zero ( numberOfDegrees_ , numberOfOrders_ ) ; for ( unsigned int i = 0 ; i < deformingBodyStateFunctions_ . size ( ) ; i ++ ) { setBodyGeometryParameters ( i , time ) ; massRatio = deformingBodyMasses_ [ i ] ( ) / deformedBodyMass_ ( ) ; for ( unsigned int j = 0 ; j < correctionFunctions . size ( ) ; j ++ ) { correctionFunctions [ j ] ( cTermCorrections , sTermCorrections ) ; } } return std :: make_pair ( cTermCorrections , sTermCorrections ) ; }
Function for calculating spherical harmonic coefficient corrections.
Function for calculating spherical harmonic coefficient corrections .
// Initialize corrections to zero.
 // Iterate over all bodies causing deformation and calculate and add associated corrections
 // Calculate properties of currently considered body
 // Calculate all correction functions.
