Tudat/Mathematics/BasicMathematics/sphericalHarmonics.cpp
//! Compute the gradient of a single term of a spherical harmonics potential field.
Compute the gradient of a single term of a spherical harmonics potential field.
Compute the gradient of a single term of a spherical harmonics potential field .
Eigen::Vector3d computePotentialGradient( const Eigen::Vector3d& sphericalPosition,
                                          const double preMultiplier,
                                          const int degree,
                                          const int order,
                                          const double cosineHarmonicCoefficient,
                                          const double sineHarmonicCoefficient,
                                          const double legendrePolynomial,
                                          const double legendrePolynomialDerivative,
                                          const std::shared_ptr< SphericalHarmonicsCache > sphericalHarmonicsCache )
{
    return computePotentialGradient(
                sphericalPosition( radiusIndex ),
                sphericalHarmonicsCache->getReferenceRadiusRatioPowers( degree + 1 ),
                sphericalHarmonicsCache->getCosineOfMultipleLongitude( order ),
                sphericalHarmonicsCache->getSineOfMultipleLongitude( order ),
                sphericalHarmonicsCache->getLegendreCache( )->getCurrentPolynomialParameterComplement( ),
                preMultiplier, degree, order,
                cosineHarmonicCoefficient, sineHarmonicCoefficient, legendrePolynomial,legendrePolynomialDerivative );
}
Eigen :: Vector3d computePotentialGradient ( const Eigen :: Vector3d & sphericalPosition , const double preMultiplier , const int degree , const int order , const double cosineHarmonicCoefficient , const double sineHarmonicCoefficient , const double legendrePolynomial , const double legendrePolynomialDerivative , const std :: shared_ptr < SphericalHarmonicsCache > sphericalHarmonicsCache ) { return computePotentialGradient ( sphericalPosition ( radiusIndex ) , sphericalHarmonicsCache -> getReferenceRadiusRatioPowers ( degree + 1 ) , sphericalHarmonicsCache -> getCosineOfMultipleLongitude ( order ) , sphericalHarmonicsCache -> getSineOfMultipleLongitude ( order ) , sphericalHarmonicsCache -> getLegendreCache ( ) -> getCurrentPolynomialParameterComplement ( ) , preMultiplier , degree , order , cosineHarmonicCoefficient , sineHarmonicCoefficient , legendrePolynomial , legendrePolynomialDerivative ) ; }
Compute the gradient of a single term of a spherical harmonics potential field.
Compute the gradient of a single term of a spherical harmonics potential field .