astrodynx.solve_kepler_elps

astrodynx.solve_kepler_elps#

astrodynx.solve_kepler_elps(M, e, tol=1e-06, max_iter=20)[source]#

Returns the eccentric anomaly for an elliptical orbit.

Parameters:
  • M (DTypeLike) – Mean anomaly.

  • e (DTypeLike) – Eccentricity of the orbit, 0 <= e < 1.

  • tol (DTypeLike) – (optional) Tolerance for convergence.

  • max_iter (int) – (optional) Maximum number of iterations.

Return type:

Array

Returns:

The eccentric anomaly for an elliptical orbit.

Notes

The eccentric anomaly is calculated by solving Kepler’s equation for elliptical orbits:

\[ E - e \sin E = M \]
where \(E\) is the eccentric anomaly, \(e\) is the eccentricity, and \(M\) is the mean anomaly.

References

Vallado, 2013, pp.76.

Examples

A simple example:

>>> import jax.numpy as jnp
>>> import astrodynx as adx
>>> e = 0.37255
>>> M = 3.6029
>>> adx.solve_kepler_elps(M,e)
Array(3.479..., dtype=float32, weak_type=True)