astrodynx.equ_of_orbit

Contents

astrodynx.equ_of_orbit#

astrodynx.equ_of_orbit(p, e, f)[source]#

Returns the equation of the orbit in the two-body system.

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

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

  • f (ArrayLike) – True anomaly of the orbit; shape broadcast-compatible with p and e.

Return type:

Array

Returns:

The equation of the orbit.

Notes

The equation of the orbit is calculated using equation (3.20):

\[ r = \frac{p}{1 + e \cos(f)} \]
where \(r\) is the norm of the position vector, \(p\) is the semiparameter, \(e\) is the eccentricity, and \(f\) is the true anomaly.

References

Battin, 1999, pp.117.

Examples

A simple example of calculating the equation of the orbit with a semiparameter of 1.0, eccentricity of 0.0, and true anomaly of 0.0:

>>> import jax.numpy as jnp
>>> import astrodynx as adx
>>> p = 1.0
>>> e = 0.0
>>> f = 0.0
>>> adx.equ_of_orbit(p, e, f)
Array(1., dtype=float32, weak_type=True)

With broadcasting, you can calculate the equation of the orbit for multiple semiparameters, eccentricities, and true anomalies:

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