# Orbit modeling

Orbit modeling is the process of creating mathematical models to simulate motion of a massive body as it moves in orbit around another massive body due to gravity. Other forces such as gravitational attraction from tertiary bodies, air resistance, solar pressure, or thrust from a propulsion system are typically modeled as secondary effects. Directly modeling an orbit can push the limits of machine precision due to the need to model small perturbations to very large orbits. Because of this, perturbation methods are often used to model the orbit in order to achieve better accuracy.

## Background

The study of orbital motion and mathematical modeling of orbits began with the first attempts to predict planetary motions in the sky, although in ancient times the causes remained a mystery. Newton, at the time he formulated his laws of motion and of gravitation, applied them to the first analysis of perturbations, recognizing the complex difficulties of their calculation. Many of the great mathematicians since then have given attention to the various problems involved; throughout the 18th and 19th centuries there was demand for accurate tables of the position of the Moon and planets for purposes of navigation at sea.
The complex motions of orbits can be broken down. The hypothetical motion that the body follows under the gravitational effect of one other body only is typically a conic section, and can be readily modeled with the methods of geometry. This is called a two-body problem, or an unperturbed Keplerian orbit. The differences between the Keplerian orbit and the actual motion of the body are caused by perturbations. These perturbations are caused by forces other than the gravitational effect between the primary and secondary body and must be modeled to create an accurate orbit simulation. Most orbit modeling approaches model the two-body problem and then add models of these perturbing forces and simulate these models over time. Perturbing forces may include gravitational attraction from other bodies besides the primary, solar wind, drag, magnetic fields, and propulsive forces.
Analytical solutions (mathematical expressions to predict the positions and motions at any future time) for simple two-body and three-body problems exist; none have been found for the n-body problem except for certain special cases. Even the two-body problem becomes insoluble if one of the bodies is irregular in shape.
Due to the difficulty in finding analytic solutions to most problems of interest, computer modeling and simulation is typically used to analyze orbital motion. A wide variety of software is available to simulate orbits and trajectories of spacecraft.

## Keplerian orbit model

In its simplest form, an orbit model can be created by assuming that only two bodies are involved, both behave as spherical point-masses, and that no other forces act on the bodies. For this case the model is simplified to a Kepler orbit.
Keplerian orbits follow conic sections. The mathematical model of the orbit which gives the distance between a central body and an orbiting body can be expressed as:
    $r(\nu )={\frac {a(1-e^{2})}{1+e\cos(\nu )}}$
Where:
    $r$ is the distance
    $a$ is the semi-major axis, which defines the size of the orbit
    $e$ is the eccentricity, which defines the shape of the orbit
    $\nu$ is the true anomaly, which is the angle between the current position of the orbiting object and the location in the orbit at it is closest to the central body (called the periapsis)
Alternately, the equation can be expressed as:
    $r(\nu )={\frac {p}{1+e\cos(\nu )}}$
Where $p$ is called the semi-latus rectum of the curve. This form of the equation is particularly useful when dealing with parabolic trajectories, for which the semi-major axis is infinite.
An alternate approach uses Isaac Newton's law of universal gravitation as defined below:
    $F=G{\frac {m_{1}m_{2}}{r^{2}}}$
where:
    $F$ is the magnitude of the gravitational force between the two point masses
    $G$ is the gravitational constant
    $m_{1}$ is the mass of the first point mass
    $m_{2}$ is the mass of the second point mass
    $r$ is the distance between the two point masses
Making an additional assumption that the mass of the primary body is much greater than the mass of the secondary body and substituting in Newton's second law of motion, results in the following differential equation
    ${\ddot {\mathbf {r} }}={\frac {Gm_{1}}{r^{2}}}\mathbf {\hat {r}}$
Solving this differential equation results in Keplerian motion for an orbit. In practice, Keplerian orbits are typically only useful for first-order approximations, special cases, or as the base model for a perturbed orbit.

## Orbit simulation methods

Orbit models are typically propagated in time and space using special perturbation methods. This is performed by first modeling the orbit as a Keplerian orbit. Then perturbations are added to the model to account for the various perturbations that affect the orbit. Special perturbations can be applied to any problem in celestial mechanics, as it is not limited to cases where the perturbing forces are small. Special perturbation methods are the basis of the most accurate machine-generated planetary ephemerides. see, for instance, Jet Propulsion Laboratory Development Ephemeris

### Cowell's method

Cowell's method is a special perturbation method; mathematically, for $n$ mutually interacting bodies, Newtonian forces on body $i$ from the other bodies $j$ are simply summed thus,
    $\mathbf {\ddot {r}} _{i}=\sum _{\underset {j\neq i}{j=1}}^{n}{Gm_{j}(\mathbf {r} _{j}-\mathbf {r} _{i}) \over r_{ij}^{3}}$
where
    $\mathbf {\ddot {r}} _{i}$ is the acceleration vector of body $i$
    $G$ is the gravitational constant
    $m_{j}$ is the mass of body $j$
    $\mathbf {r} _{i}$ and $\mathbf {r} _{j}$ are the position vectors of objects $i$ and $j$
    $r_{ij}$ is the distance from object $i$ to object $j$
with all vectors being referred to the barycenter of the system. This equation is resolved into components in $x$, $y$, $z$ and these are integrated numerically to form the new velocity and position vectors as the simulation moves forward in time. The advantage of Cowell's method is ease of application and programming. A disadvantage is that when perturbations become large in magnitude (as when an object makes a close approach to another) the errors of the method also become large. Another disadvantage is that in systems with a dominant central body, such as the Sun, it is necessary to carry many significant digits in the arithmetic because of the large difference in the forces of the central body and the perturbing bodies.

### Encke's method

Encke's method begins with the osculating orbit as a reference and integrates numerically to solve for the variation from the reference as a function of time. Its advantages are that perturbations are generally small in magnitude, so the integration can proceed in larger steps (with resulting lesser errors), and the method is much less affected by extreme perturbations than Cowell's method. Its disadvantage is complexity; it cannot be used indefinitely without occasionally updating the osculating orbit and continuing from there, a process known as rectification.
Letting ${\boldsymbol {\rho }}$ be the radius vector of the osculating orbit, $\mathbf {r}$ the radius vector of the perturbed orbit, and $\delta \mathbf {r}$ the variation from the osculating orbit,
$\mathbf {\ddot {r}}$ and ${\boldsymbol {\ddot {\rho }}}$ are just the equations of motion of $\mathbf {r}$ and ${\boldsymbol {\rho }}$,
where $\mu =G(M+m)$ is the gravitational parameter with $M$ and $m$ the masses of the central body and the perturbed body, $\mathbf {a} _{\text{per}}$ is the perturbing acceleration, and $r$ and $\rho$ are the magnitudes of $\mathbf {r}$ and ${\boldsymbol {\rho }}$.
Substituting from equations (3) and (4) into equation (2),
which, in theory, could be integrated twice to find $\delta \mathbf {r}$. Since the osculating orbit is easily calculated by two-body methods, ${\boldsymbol {\rho }}$ and $\delta \mathbf {r}$ are accounted for and $\mathbf {r}$ can be solved. In practice, the quantity in the brackets, ${{\boldsymbol {\rho }} \over \rho ^{3}}-{\mathbf {r} \over r^{3}}$, is the difference of two nearly equal vectors, and further manipulation is necessary to avoid the need for extra significant digits.

### Sperling–Burdet method

In 1991 Victor R. Bond and Michael F. Fraietta created an efficient and highly accurate method for solving the two-body perturbed problem. This method uses the linearized and regularized differential equations of motion derived by Hans Sperling and a perturbation theory based on these equations developed by C.A. Burdet in the year 1864. In 1973, Bond and Hanssen improved Burdet's set of differential equations by using the total energy of the perturbed system as a parameter instead of the two-body energy and by reducing the number of elements to 13. In 1989 Bond and Gottlieb embedded the Jacobian integral, which is a constant when the potential function is explicitly dependent upon time as well as position in the Newtonian equations. The Jacobian constant was used as an element to replace the total energy in a reformulation of the differential equations of motion. In this process, another element which is proportional to a component of the angular momentum is introduced. This brought the total number of elements back to 14. In 1991, Bond and Fraietta made further revisions by replacing the Laplace vector with another vector integral as well as another scalar integral which removed small secular terms which appeared in the differential equations for some of the elements.
The Sperling–Burdet method is executed in a 5 step process as follows:
    Step 1: Initialization
       Given an initial position, $\mathbf {r} _{0}$, an initial velocity, $\mathbf {v} _{0}$, and an initial time, $t_{0}$, the following variables are initialized:
       $s=0$
       $r_{0}=(\mathbf {r} _{0}\cdot \mathbf {r} _{0})^{1/2}$
       $a=r_{0}$
       $b=\mathbf {r} _{0}\cdot \mathbf {v} _{0}$
       $\tau =t_{0}$
       ${\boldsymbol {\alpha }}=\mathbf {r} _{0}$
       ${\boldsymbol {\beta }}=a\mathbf {v} _{0}$
       Perturbations due to perturbing masses, defined as $V_{0}$ and ${\Bigg{\partial {V} \over {\partial {\mathbf {r} }}}{\Bigg ]}_{0}$, are evaluated
       Perturbations due to other accelerations, defined as $\mathbf {P} _{0}$, are evaluated
       $\alpha _{J}={\frac {2\mu }{r_{0}}}-\mathbf {v} _{0}\cdot \mathbf {v} _{0}-2V_{0}$
       $\gamma =\mu -\alpha _{J}a$
       ${\boldsymbol {\delta }}=-(\mathbf {v} _{0}\cdot \mathbf {v} _{0})\mathbf {r} _{0}+(\mathbf {r} _{0}\cdot \mathbf {v} _{0})\mathbf {v} _{0}+{\frac {\mu }{r_{0}}}\mathbf {r} _{0}-\alpha _{J}\mathbf {r} _{0}$
       $\sigma =0$
    Step 2: Transform elements to coordinates
       $\mathbf {r} ={\boldsymbol {\alpha }}+{\boldsymbol {\beta }}sc_{1}+{\boldsymbol {\delta }}s^{2}c_{2}$
       $\mathbf {r'} ={\boldsymbol {\beta }}c_{0}+{\boldsymbol {\delta }}sc_{1}$
       $\mathbf {x} _{3}=\alpha _{J}({\boldsymbol {\alpha }}-\mathbf {r} )+{\boldsymbol {\delta }}$
       $\gamma =\mu -\alpha _{J}a$
       $r=a+bsc_{1}+\gamma s^{2}c_{2}$
       $\mathbf {v} =\mathbf {r'} /r$
       $r'=bc_{0}+\gamma sc_{1}$
       $t=\tau +as+bs^{2}c_{2}+\gamma s^{3}c_{3}$
       where $c_{0},c_{1},c_{2},c_{3}$ are Stumpff functions
    Step 3: Evaluate differential equations for the elements
       $\mathbf {F} =\mathbf {P} -{\partial {V} \over \partial {\mathbf {r} }}$
       $\mathbf {Q} =r^{2}\mathbf {F} +2\mathbf {r} (-V+\sigma )$
       $\alpha '_{J}=2(-\mathbf {r'} +r{\boldsymbol {\omega }}\times \mathbf {r} )\cdot \mathbf {P}$
       $\mu {\boldsymbol {\epsilon }}'=2(\mathbf {r'} \cdot \mathbf {F} )\mathbf {r} -(\mathbf {r} \cdot \mathbf {F} )\mathbf {r'} -(\mathbf {r} \cdot \mathbf {r'} )\mathbf {F}$
       ${\boldsymbol {\alpha }}'=-\mathbf {Q} sc_{1}-\mu {\boldsymbol {\epsilon }}'s^{2}c_{2}-\alpha '_{J}{\big{\boldsymbol {\alpha }}s^{2}c_{2}+2{\boldsymbol {\beta }}s^{3}{\bar {c}}_{3}+{\frac {1}{2}}{\boldsymbol {\delta }}s^{4}c_{2}^{2}{\big ]}$
       ${\boldsymbol {\beta }}'=\mathbf {Q} c_{0}+\mu {\boldsymbol {\epsilon }}'sc_{1}+\alpha '_{J}{\big{\boldsymbol {\alpha }}sc_{1}+{\boldsymbol {\beta }}s^{2}{\bar {c}}_{2}-{\boldsymbol {\delta }}s^{3}(2{\bar {c}}_{3}-c_{1}c_{2}){\big ]}$
       ${\boldsymbol {\delta }}'=\mathbf {Q} \alpha _{J}sc_{1}-\mu {\boldsymbol {\epsilon }}'c_{0}+\alpha '_{J}{\big-{\boldsymbol {\alpha }}c_{0}+2\alpha _{J}{\boldsymbol {\beta }}s^{3}{\bar {c}}_{3}+{\frac {1}{2}}{\boldsymbol {\delta }}\alpha _{J}s^{4}c_{2}^{2}{\big ]}$
       $\sigma '=r{\boldsymbol {\omega }}\cdot \mathbf {r} \times \mathbf {F}$
       $a'=-{\frac {1}{r}}\mathbf {r} \cdot \mathbf {Q} sc_{1}-\alpha _{J}'{\bigas^{2}c_{2}+2bs^{3}{\bar {c}}_{3}+{\frac {1}{2}}\gamma s^{4}c_{2}^{2}{\big ]}$
       $b'={\frac {1}{r}}\mathbf {r} \cdot \mathbf {Q} c_{0}+\alpha _{J}'{\bigasc_{1}+bs^{2}{\bar {c}}_{2}-\gamma s^{3}(2{\bar {c}}_{3}-c_{1}c_{2}){\big ]}$
       $\gamma '=-{\frac {1}{r}}\mathbf {r} \cdot \mathbf {Q} \alpha _{J}sc_{1}+\alpha _{J}'{\big-ac_{0}+2b\alpha _{J}s^{3}{\bar {c}}_{3}+{\frac {1}{2}}\gamma \alpha _{J}s^{4}c_{2}^{2}{\big ]}$
       $\tau '={\frac {1}{r}}\mathbf {r} \cdot \mathbf {Q} s^{2}c_{2}+\alpha _{J}'{\bigas^{3}c_{3}+{\frac {1}{2}}bs^{4}c_{2}^{2}-2\gamma s^{5}(c_{5}-4{\bar {c}}_{5}){\big ]}$
    Step 4: Integration
       Here the differential equations are integrated over a period $\Delta s$ to obtain the element value at $s+\Delta s$
    Step 5: Advance
       Set $s=s+\Delta s$ and return to step 2 until simulation stopping conditions are met.

## Perturbations

Perturbing forces cause orbits to become perturbed from a perfect Keplerian orbit. Models for each of these forces are created and executed during the orbit simulation so their effects on the orbit can be determined.

### Non-spherical gravity

The Earth is not a perfect sphere nor is mass evenly distributed within the Earth. This results in the point-mass gravity model being inaccurate for orbits around the Earth, particularly Low Earth orbits. To account for variations in gravitational potential around the surface of the Earth, the gravitational field of the Earth is modeled with spherical harmonics which are expressed through the equation:
    ${\mathbf {f} }=-{\frac {\mu }{R^{2}}}\mathbf {\hat {r}} +\sum _{n=2}^{\infty }\sum _{m=0}^{n}{\mathbf {f} }_{n,m}$
where
    ${\mu }$ is the gravitational parameter defined as the product of G, the universal gravitational constant, and the mass of the primary body.
    $\mathbf {\hat {r}}$ is the unit vector defining the distance between the primary and secondary bodies, with ${R}$ being the magnitude of the distance.
    ${\mathbf {f} }_{n,m}$ represents the contribution to ${\mathbf {f} }$ of the spherical harmonic of degree n and order m, which is defined as:
    ${\begin{aligned}\mathbf {f} _{n,m}&={\frac {\mu R_{O}^{2}}{R^{n+m+1}}}\left({\frac {C_{n,m}{\mathcal {C}}_{m}+S_{n,m}{\mathcal {S}}_{m}}{R}}(A_{n,m+1}\mathbf {\hat {e}} _{3}-\left(s_{\lambda }A_{n,m+1}+(n+m+1)A_{n,m}\right)\mathbf {\hat {r}} \right)\\[10pt]&\quad+mA_{n,m}((C_{n,m}{\mathcal {C}}_{m-1}+S_{n,m}{\mathcal {S}}_{m-1})\mathbf {\hat {e}} _{1}+(S_{n,m}{\mathcal {C}}_{m-1}-C_{n,m}{\mathcal {S}}_{m-1})\mathbf {\hat {e}} _{2}))\end{aligned}}$
where:
    $R_{O}$ is the mean equatorial radius of the primary body.
    $R$ is the magnitude of the position vector from the center of the primary body to the center of the secondary body.
    $C_{n,m}$ and $S_{n,m}$ are gravitational coefficients of degree n and order m. These are typically found through gravimetry measurements.
    The unit vectors $\mathbf {\hat {e}} _{1},\mathbf {\hat {e}} _{2},\mathbf {\hat {e}} _{3}$ define a coordinate system fixed on the primary body. For the Earth, $\mathbf {\hat {e}} _{1}$ lies in the equatorial plane parallel to a line intersecting Earth's geometric center and the Greenwich meridian,$\mathbf {\hat {e}} _{3}$ points in the direction of the North polar axis, and $\mathbf {\hat {e}} _{2}=\mathbf {\hat {e}} _{3}\times \mathbf {\hat {e}} _{1}$
    $A_{n,m}$ is referred to as a derived Legendre polynomial of degree n and order m. They are solved through the recurrence relation: $A_{n,m}(u)={\frac {1}{n-m}}((2n-1)uA_{n-1,m}(u)-(n+m-1)A_{n-2,m}(u))$
    $s_{\lambda }$ is sine of the geographic latitude of the secondary body, which is $\mathbf {\hat {r}} \cdot \mathbf {\hat {e}} _{3}$.
    ${\mathcal {C}}_{m},{\mathcal {S}}_{m}$ are defined with the following recurrence relation and initial conditions:${\mathcal {C}}_{m}={\mathcal {C}}_{1}{\mathcal {C}}_{m-1}-{\mathcal {S}}_{1}{\mathcal {S}}_{m-1},{\mathcal {S}}_{m}={\mathcal {S}}_{1}{\mathcal {C}}_{m-1}+{\mathcal {C}}_{1}{\mathcal {S}}_{m-1},{\mathcal {S}}_{0}=0,{\mathcal {S}}_{1}=\mathbf {R} \cdot \mathbf {\hat {e}} _{2},{\mathcal {C}}_{0}=1,{\mathcal {C}}_{1}=\mathbf {R} \cdot \mathbf {\hat {e}} _{1}$
When modeling perturbations of an orbit around a primary body only the sum of the ${\mathbf {f} }_{n,m}$ terms need to be included in the perturbation since the point-mass gravity model is accounted for in the $-{\frac {\mu }{R^{2}}}\mathbf {\hat {r}}$ term

### Third-body perturbations

Gravitational forces from third bodies can cause perturbations to an orbit. For example, the Sun and Moon cause perturbations to Orbits around the Earth. These forces are modeled in the same way that gravity is modeled for the primary body by means of direct gravitational N-body simulations. Typically, only a spherical point-mass gravity model is used for modeling effects from these third bodies. Some special cases of third-body perturbations have approximate analytic solutions. For example, perturbations for the right ascension of the ascending node and argument of perigee for a circular Earth orbit are:
    ${\dot {\Omega }}_{\mathrm {MOON} }=-0.00338(\cos(i))/n$
    ${\dot {\omega }}_{\mathrm {MOON} }=-0.00169(4-5\sin ^{2}(i))/n$
    where:
    ${\dot {\Omega }}$ is the change to the right ascension of the ascending node in degrees per day.
    ${\dot {\omega }}$ is the change to the argument of perigee in degrees per day.
    $i$ is the orbital inclination.
    $n$ is the number of orbital revolutions per day.

### Solar radiation

Solar radiation pressure causes perturbations to orbits. The magnitude of acceleration it imparts to a spacecraft in Earth orbit is modeled using the equation below:
    $a_{R}\approx -4.5\times 10^{-6}(1+r)A/m$
where:
    $a_{R}$ is the magnitude of acceleration in meters per second-squared.
    $A$ is the cross-sectional area exposed to the Sun in meters-squared.
    $m$ is the spacecraft mass in kilograms.
    $r$ is the reflection factor which depends on material properties. $r=0$ for absorption, $r=1$ for specular reflection, and $r\approx 0.4$ for diffuse reflection.
For orbits around the Earth, solar radiation pressure becomes a stronger force than drag above 800 km (500 mi) altitude.

### Propulsion

There are many different types of spacecraft propulsion. Rocket engines are one of the most widely used. The force of a rocket engine is modeled by the equation:
    $F_{n}={\dot {m}}\;v_{\text{e}}={\dot {m}}\;v_{\text{e-act}}+A_{\text{e}}(p_{\text{e}}-p_{\text{amb}})$
    where:   ${\dot {m}}$ = exhaust gas mass flow $v_{\text{e}}$ = effective exhaust velocity $v_{\text{e-act}}$ = actual jet velocity at nozzle exit plane $A_{\text{e}}$ = flow area at nozzle exit plane (or the plane where the jet leaves the nozzle if separated flow) $p_{\text{e}}$ = static pressure at nozzle exit plane $p_{\text{amb}}$ = ambient (or atmospheric) pressure
Another possible method is a solar sail. Solar sails use radiation pressure in a way to achieve a desired propulsive force. The perturbation model due to the solar wind can be used as a model of propulsive force from a solar sail.

### Drag

The primary non-gravitational force acting on satellites in low Earth orbit is atmospheric drag. Drag will act in opposition to the direction of velocity and remove energy from an orbit. The force due to drag is modeled by the following equation:
    $F_{D}\,=\,{\tfrac {1}{2}}\,\rho \,v^{2}\,C_{d}\,A,$
where
    $\mathbf {F} _{D}$ is the force of drag,
    $\mathbf \rho$ is the density of the fluid,
    $\mathbf v$ is the velocity of the object relative to the fluid,
    $\mathbf C_{d}$ is the drag coefficient (a dimensionless parameter, e.g. 2 to 4 for most satellites)
    $\mathbf A$ is the reference area.
Orbits with an altitude below 120 km (75 mi) generally have such high drag that the orbits decay too rapidly to give a satellite a sufficient lifetime to accomplish any practical mission. On the other hand, orbits with an altitude above 600 km (370 mi) have relatively small drag so that the orbit decays slow enough that it has no real impact on the satellite over its useful life. Density of air can vary significantly in the thermosphere where most low Earth orbiting satellites reside. The variation is primarily due to solar activity, and thus solar activity can greatly influence the force of drag on a spacecraft and complicate long-term orbit simulation.

### Magnetic fields

Magnetic fields can play a significant role as a source of orbit perturbation as was seen in the Long Duration Exposure Facility. Like gravity, the magnetic field of the Earth can be expressed through spherical harmonics as shown below:
    ${\mathbf {B} }=\sum _{n=1}^{\infty }\sum _{m=0}^{n}{\mathbf {B} }_{n,m}$
where
    ${\mathbf {B} }$ is the magnetic field vector at a point above the Earth's surface.
    ${\mathbf {B} }_{n,m}$ represents the contribution to ${\mathbf {B} }$ of the spherical harmonic of degree n and order m, defined as:
    ${\begin{aligned}\mathbf {B} _{n,m}=&{\frac {K_{n,m}a^{n+2}}{R^{n+m+1}}}\left[{\frac {g_{n,m}{\mathcal {C}}_{m}+h_{n,m}{\mathcal {S}}_{m}}{R}}((s_{\lambda }A_{n,m+1}+(n+m+1)A_{n,m})\mathbf {\hat {r}} )-A_{n,m+1}\mathbf {\hat {e}} _{3}\right]\\[10pt]&-mA_{n,m}((g_{n,m}{\mathcal {C}}_{m-1}+h_{n,m}{\mathcal {S}}_{m-1})\mathbf {\hat {e}} _{1}+(h_{n,m}{\mathcal {C}}_{m-1}-g_{n,m}{\mathcal {S}}_{m-1})\mathbf {\hat {e}} _{2}))\end{aligned}}$
where:
    $a$ is the mean equatorial radius of the primary body.
    $R$ is the magnitude of the position vector from the center of the primary body to the center of the secondary body.
    $\mathbf {\hat {r}}$ is a unit vector in the direction of the secondary body with its origin at the center of the primary body.
    $g_{n,m}$ and $h_{n,m}$ are Gauss coefficients of degree n and order m. These are typically found through magnetic field measurements.
    The unit vectors $\mathbf {\hat {e}} _{1},\mathbf {\hat {e}} _{2},\mathbf {\hat {e}} _{3}$ define a coordinate system fixed on the primary body. For the Earth, $\mathbf {\hat {e}} _{1}$ lies in the equatorial plane parallel to a line intersecting Earth's geometric center and the Greenwich meridian,$\mathbf {\hat {e}} _{3}$ points in the direction of the North polar axis, and $\mathbf {\hat {e}} _{2}=\mathbf {\hat {e}} _{3}\times \mathbf {\hat {e}} _{1}$
    $A_{n,m}$ is referred to as a derived Legendre polynomial of degree n and order m. They are solved through the recurrence relation: $A_{n,m}(u)={\frac {1}{n-m}}((2n-1)uA_{n-1,m}(u)-(n+m-1)A_{n-2,m}(u))$
    $K_{n,m}$ is defined as: 1 if m = 0, ${\big{\frac {n-m}{n+m}}{\big ]}^{0.5}K_{n-1,m}$ for $n\geq (m+1)$ and $m=[1\ldots \infty ]$ , and $[(n+m)(n-m+1)]^{-0.5}K_{n,m-1}$ for $n\geq m$ and $m=[2\ldots \infty ]$
    $s_{\lambda }$ is sine of the geographic latitude of the secondary body, which is $\mathbf {\hat {r}} \cdot \mathbf {\hat {e}} _{3}$.
    ${\mathcal {C}}_{m},{\mathcal {S}}_{m}$ are defined with the following recurrence relation and initial conditions:${\mathcal {C}}_{m}={\mathcal {C}}_{1}{\mathcal {C}}_{m-1}-{\mathcal {S}}_{1}{\mathcal {S}}_{m-1},{\mathcal {S}}_{m}={\mathcal {S}}_{1}{\mathcal {C}}_{m-1}+{\mathcal {C}}_{1}{\mathcal {S}}_{m-1},{\mathcal {S}}_{0}=0,{\mathcal {S}}_{1}=\mathbf {R} \cdot \mathbf {\hat {e}} _{2},{\mathcal {C}}_{0}=1,{\mathcal {C}}_{1}=\mathbf {R} \cdot \mathbf {\hat {e}} _{1}$