# Perturbations module¶

## ¶

The poliastro.core.perturbations enables the user of poliastro to reproduce some perturbations, since certain conditions can not always be assumed ideal. This module enables to recreate those non-ideal conditions.

poliastro.core.perturbations.J2_perturbation

Calculates J2_perturbation acceleration (km/s2)

$\vec{p} = \frac{3}{2}\frac{J_{2}\mu R^{2}}{r^{4}}\left [\frac{x}{r}\left ( 5\frac{z^{2}}{r^{2}}-1 \right )\vec{i} + \frac{y}{r}\left ( 5\frac{z^{2}}{r^{2}}-1 \right )\vec{j} + \frac{z}{r}\left ( 5\frac{z^{2}}{r^{2}}-3 \right )\vec{k}\right]$

New in version 0.9.0.

Parameters: t0 (float) – Current time (s) state (numpy.ndarray) – Six component state vector [x, y, z, vx, vy, vz] (km, km/s). k (float) – gravitational constant, (km^3/s^2) J2 (float) – oblateness factor R (float) – attractor radius

Note

The J2 accounts for the oblateness of the attractor. The formula is given in Howard Curtis, (12.30)

poliastro.core.perturbations.J3_perturbation

Calculates J3_perturbation acceleration (km/s2)

Parameters: t0 (float) – Current time (s) state (numpy.ndarray) – Six component state vector [x, y, z, vx, vy, vz] (km, km/s). k (float) – gravitational constant, (km^3/s^2) J3 (float) – oblateness factor R (float) – attractor radius

Note

The J3 accounts for the oblateness of the attractor. The formula is given in Howard Curtis, problem 12.8 This perturbation has not been fully validated, see https://github.com/poliastro/poliastro/pull/398

poliastro.core.perturbations.atmospheric_drag

Calculates atmospheric drag acceleration (km/s2)

$\vec{p} = -\frac{1}{2}\rho v_{rel}\left ( \frac{C_{d}A}{m} \right )\vec{v_{rel}}$

New in version 0.9.0.

Parameters: t0 (float) – Current time (s) state (numpy.ndarray) – Six component state vector [x, y, z, vx, vy, vz] (km, km/s). k (float) – gravitational constant, (km^3/s^2) R (float) – radius of the attractor (km) C_D (float) – dimensionless drag coefficient () A (float) – frontal area of the spacecraft (km^2) m (float) – mass of the spacecraft (kg) H0 (float) – atmospheric scale height, (km) rho0 (float) – the exponent density pre-factor, (kg / km^3)

Note

This function provides the acceleration due to atmospheric drag. We follow Howard Curtis, section 12.4 the atmospheric density model is rho(H) = rho0 x exp(-H / H0)

poliastro.core.perturbations.shadow_function

Determines whether the satellite is in attractor’s shadow, uses algorithm 12.3 from Howard Curtis

Parameters: r_sat (numpy.ndarray) – position of the satellite in the frame of attractor (km) r_sun (numpy.ndarray) – position of star in the frame of attractor (km) R (float) – radius of body (attractor) that creates shadow (km)
poliastro.core.perturbations.third_body(t0, state, k, k_third, third_body)

Calculates 3rd body acceleration (km/s2)

$\vec{p} = \mu_{m}\left ( \frac{\vec{r_{m/s}}}{r_{m/s}^3} - \frac{\vec{r_{m}}}{r_{m}^3} \right )$
Parameters: t0 (float) – Current time (s) state (numpy.ndarray) – Six component state vector [x, y, z, vx, vy, vz] (km, km/s). k (float) – gravitational constant, (km^3/s^2) third_body (a callable object returning the position of 3rd body) – third body that causes the perturbation

Note

This formula is taken from Howard Curtis, section 12.10. As an example, a third body could be the gravity from the Moon acting on a small satellite.

poliastro.core.perturbations.radiation_pressure(t0, state, k, R, C_R, A, m, Wdivc_s, star)

$\vec{p} = -\nu \frac{S}{c} \left ( \frac{C_{r}A}{m} \right )\frac{\vec{r}}{r}$