Tudat/Astrodynamics/Gravitation/basicSolidBodyTideGravityFieldVariations.cpp
//! Function to calculate solid body tide gravity field variations due to single body at single degree and order directly
//! from perturbing body's Cartesian state.

Function to calculate solid body tide gravity field variations due to single body at single degree and order directly
from perturbing body's Cartesian state.
Function to calculate solid body tide gravity field variations due to single body at single degree and order directly from perturbing body ' s Cartesian state .
std::complex< double > calculateSolidBodyTideSingleCoefficientSetCorrectionFromAmplitude(
        const std::complex< double > loveNumber, const double massRatio,
        const double referenceRadius, const Eigen::Vector3d& relativeBodyFixedPosition, const int degree, const int order )
{
    Eigen::Vector3d sphericalPosition = coordinate_conversions::convertCartesianToSpherical(
                relativeBodyFixedPosition );
    double tideAmplitude = basic_mathematics::computeLegendrePolynomialExplicit(
                degree, order, std::sin( mathematical_constants::PI / 2.0 - sphericalPosition.y( ) ) ) *
            basic_mathematics::calculateLegendreGeodesyNormalizationFactor(
                            degree, order );
    std::complex< double > tideArgument = static_cast< double >( order ) * std::complex< double >( 0.0, sphericalPosition( 2 ) );
    return loveNumber / ( 2.0 * static_cast< double >( degree ) + 1.0 ) *
            massRatio * std::pow( referenceRadius / sphericalPosition( 0 ), degree + 1 ) *
            tideAmplitude * std::exp( -tideArgument );
}
std :: complex < double > calculateSolidBodyTideSingleCoefficientSetCorrectionFromAmplitude ( const std :: complex < double > loveNumber , const double massRatio , const double referenceRadius , const Eigen :: Vector3d & relativeBodyFixedPosition , const int degree , const int order ) { Eigen :: Vector3d sphericalPosition = coordinate_conversions :: convertCartesianToSpherical ( relativeBodyFixedPosition ) ; double tideAmplitude = basic_mathematics :: computeLegendrePolynomialExplicit ( degree , order , std :: sin ( mathematical_constants :: PI / 2.0 - sphericalPosition . y ( ) ) ) * basic_mathematics :: calculateLegendreGeodesyNormalizationFactor ( degree , order ) ; std :: complex < double > tideArgument = static_cast < double > ( order ) * std :: complex < double > ( 0.0 , sphericalPosition ( 2 ) ) ; return loveNumber / ( 2.0 * static_cast < double > ( degree ) + 1.0 ) * massRatio * std :: pow ( referenceRadius / sphericalPosition ( 0 ) , degree + 1 ) * tideAmplitude * std :: exp ( - tideArgument ) ; }
Function to calculate solid body tide gravity field variations due to single body at single degree and order directly
from perturbing body's Cartesian state.
Function to calculate solid body tide gravity field variations due to single body at single degree and order directly from perturbing body ' s Cartesian state .
// Calculate spherical position of perturbing body.
 // Calculate amplitude and argument of tide
 // Calculate tidal corrections.
