# Gravitational potential using spherical harmonics (WGS84)

ryan88
Hi,

I am looking to use the definition from WGS84 to calculate Earth's gravitational potential using spherical harmonics, however I am having some difficulty finding the definition of one of the variables. Gravitational potential is given as the following:

$V = \frac{GM}{r}\left [ 1 + \sum_{n=2}^{n_{max}} \sum_{m=0}^{n} \left( \frac{a}{r} \right )^n \bar{P}_{nm} \left( \sin{\phi} \right ) \left( \bar{C}_{nm} \cos{m\lambda} + \bar{S}_{nm} \sin{m\lambda} \right ) \right ]$

where:

$V$ is the gravitational potential function
$GM$ is the Earth's gravitational constant
$r$ is the distance from the Earth's centre of mass
$a$ is the semi-major axis of the WGS84 ellipsoid
$n,m$ are the degree and order respectively
$\phi$ is the geocentric latitude
$\lambda$ is the longitude
$\bar{C}_{nm},\bar{S}_{nm}$ are normalised gravitational coefficients

$\bar{P}_{nm}\left( \sin \phi \right) = \left[ \frac{(n-m)!(2n+1)k}{(n+m)!} \right] P_{nm}(\sin\phi)$

$P_{nm}(\sin\phi) = (\cos\phi)^m \frac{d^m}{d(\sin\phi)^m}[P_n(\sin\phi)]$

$P_n(\sin\phi) = \frac{1}{2^n n!} \frac{d^n}{d(\sin\phi)^n}\left( \sin^2\phi -1 \right )^n$

$m=0,k=1$
$m\ne0,k=2$

However, I can't find what the definition of $d$ is. Can anyone offer any help?

Thanks,

Ryan