astrodynx.radius_apoapsis#
- astrodynx.radius_apoapsis(p, e)[source]#
Returns the radius of apoapsis of the orbit.
- Parameters:
- Return type:
- Returns:
The radius of apoapsis of the orbit.
- Notes
The radius of apoapsis is calculated using equation:
\[ r_a = \frac{p}{1 - e} \]where \(r_a\) is the radius of apoapsis, \(p\) is the semiparameter, and \(e\) is the eccentricity.- References
Battin, 1999, pp.117.
- Examples
A simple example of calculating the radius of apoapsis 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_apoapsis(p, e) 1.0
With broadcasting, you can calculate the radius of apoapsis for multiple semiparameters and eccentricities:
>>> p = jnp.array([1.0, 2.0]) >>> e = jnp.array([0.0, 0.0]) >>> adx.radius_apoapsis(p, e) Array([1., 2.], dtype=float32)