astrodynx.mean_motion

Contents

astrodynx.mean_motion#

astrodynx.mean_motion(P)[source]#

Returns the mean motion of a two-body orbit.

Parameters:

P (ArrayLike) – Orbital period of the object in the two-body system.

Return type:

ArrayLike

Returns:

The mean motion of the orbit.

Notes

The mean motion is calculated using equation (3.24):

\[ n = \frac{2\pi}{P} \]
where \(n\) is the mean motion and \(P\) is the orbital period.

References

Battin, 1999, pp.119.

Examples

A simple example of calculating the mean motion with an orbital period of 1.0:

>>> import jax.numpy as jnp
>>> import astrodynx as adx
>>> P = 1.0
>>> adx.mean_motion(P)
6.2831...

With broadcasting, you can calculate the mean motion for multiple orbital periods:

>>> P = jnp.array([1.0, 2.0])
>>> adx.mean_motion(P)
Array([6.2831..., 3.1415...], dtype=float32)