astrodynx.semipara_from_ae

astrodynx.semipara_from_ae#

astrodynx.semipara_from_ae(a, e)[source]#

Returns the semiparameter of the orbit from the semimajor axis and eccentricity.

Parameters:
  • a (ArrayLike) – Semimajor axis of the orbit.

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

Return type:

ArrayLike

Returns:

The semiparameter of the orbit.

Notes

The semiparameter is calculated using equation:

\[ p = a(1 - e^2) \]
where \(p\) is the semiparameter, \(a\) is the semimajor axis, and \(e\) is the eccentricity.

References

Battin, 1999, pp.117.

Examples

A simple example of calculating the semiparameter with a semimajor axis of 1.0 and eccentricity of 0.0:

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

With broadcasting, you can calculate the semiparameter for multiple semimajor axes and eccentricities:

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