astrodynx.semiparameter

Contents

astrodynx.semiparameter#

astrodynx.semiparameter(h_mag, mu=1)[source]#

Returns the semiparameter of a two-body orbit.

Parameters:
  • h_mag (ArrayLike) – The angular momentum of the object in the two-body system.

  • mu (ArrayLike) – Gravitational parameter of the central body; shape broadcast-compatible with h.

Return type:

ArrayLike

Returns:

The semiparameter of the orbit.

Notes

The semiparameter is calculated using equation (3.15):

\[ p = \frac{h^2}{\mu} \]
where \(p\) is the semiparameter, \(h\) is the norm of the specific angular momentum vector, and \(\mu\) is the gravitational parameter.

References

Battin, 1999, pp.116.

Examples

A simple example of calculating the semiparameter with a specific angular momentum norm of 1.0 and gravitational parameter of 1.0:

>>> import jax.numpy as jnp
>>> import astrodynx as adx
>>> h = 1.0
>>> mu = 1.0
>>> adx.semiparameter(h, mu)
1.0

With broadcasting, you can calculate the semiparameter for multiple specific angular momentum norms and gravitational parameters:

>>> h = jnp.array([1.0, 2.0])
>>> mu = jnp.array([1.0, 2.0])
>>> adx.semiparameter(h, mu)
Array([1., 2.], dtype=float32)