28#ifndef UTILS_SPHERICALHARMONICSUTILS_H
29#define UTILS_SPHERICALHARMONICSUTILS_H
68 long int &n,
long int &m);
119 double theta,
double Re,
double K,
141 int legendre(
long N,
long M,
double x,
#define CartesianVector3
Definition mathmacros.h:43
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
void neumannNormalization(double cbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double sbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double c[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double s[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1])
Applies Neumann normalization to spherical harmonic coefficients.
Definition sphericalharmonicsutils.cpp:58
const int NMAX_SPHERICAL_HARMONICS
Definition sphericalharmonicsutils.h:38
int sphericalHarmonics(long N, long M, double r, double phi, double theta, double Re, double K, double C[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double S[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], clockwerk::CartesianVector< 3 > &grad_v)
Computes the gradient of the gravitational potential using spherical harmonics.
Definition sphericalharmonicsutils.cpp:76
double r
Definition AsphericalGravityModel.h:113
int readGravityCoefficientsFile(const std::string &filename, double cbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double sbar[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], long int &n, long int &m)
Reads gravitational coefficients from a file and stores them in provided matrices.
Definition sphericalharmonicsutils.cpp:37
double fact(long n)
Computes the factorial of a non-negative integer.
Definition sphericalharmonicsutils.cpp:183
int legendre(long N, long M, double x, double P[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1], double sd_p[NMAX_SPHERICAL_HARMONICS+1][NMAX_SPHERICAL_HARMONICS+1])
Calculates the associated Legendre functions and their derivatives.
Definition sphericalharmonicsutils.cpp:139
double oddfact(long n)
Computes the double factorial of an odd integer.
Definition sphericalharmonicsutils.cpp:192