astrodynx.radius_periapsis

astrodynx.radius_periapsis#

astrodynx.radius_periapsis(p, e)[source]#

Returns the radius of periapsis of the orbit.

Parameters:
  • p (ArrayLike) – Semiparameter of the orbit.

  • e (ArrayLike) – Eccentricity of the orbit; shape broadcast-compatible with p.

Return type:

ArrayLike

Returns:

The radius of periapsis of the orbit.

Notes

The radius of periapsis is calculated using equation:

\[ r_p = \frac{p}{1 + e} \]
where \(r_p\) is the radius of periapsis, \(p\) is the semiparameter, and \(e\) is the eccentricity.

References

Battin, 1999, pp.117.

Examples

A simple example of calculating the radius of periapsis with a semiparameter of 1.0 and eccentricity of 0.0:

>>> import jax.numpy as jnp
>>> import astrodynx as adx
>>> p = 1.0
>>> e = 0.0
>>> adx.radius_periapsis(p, e)
1.0

With broadcasting, you can calculate the radius of periapsis for multiple semiparameters and eccentricities:

>>> p = jnp.array([1.0, 2.0])
>>> e = jnp.array([0.0, 0.0])
>>> adx.radius_periapsis(p, e)
Array([1., 2.], dtype=float32)