astrodynx.twobody.ufunc5#
- astrodynx.twobody.ufunc5(chi, alpha)[source]#
The universal function U5
- Parameters:
- Return type:
- Returns:
The value of the universal function U5.
Notes
The universal function U5 is defined as:
\[\begin{split} U_5(\chi, \alpha) = \begin{cases} \frac{\alpha^2 \chi^3 - 6\alpha \chi + 6\sqrt{\alpha} \sin(\sqrt{\alpha} \chi)}{6\alpha^3} & \alpha > 0 \\ \frac{\alpha^2 \chi^3 - 6\alpha \chi - 6\sqrt{-\alpha} \sinh(\sqrt{-\alpha} \chi)}{6\alpha^3} & \alpha < 0 \\ \frac{\chi^5}{120} & \alpha = 0 \end{cases} \end{split}\]where \(\chi\) is the generalized anomaly and \(\alpha = \frac{1}{a}\) is the reciprocal of semimajor axis.References
Battin, 1999, pp.183.
Examples
A simple example:
>>> import jax.numpy as jnp >>> import astrodynx as adx >>> chi = 1.0 >>> alpha = 1.0 >>> adx.twobody.ufunc5(chi, alpha) Array(0.0081..., dtype=float32, weak_type=True)
With broadcasting:
>>> chi = jnp.array([2.0, 3.0]) >>> alpha = 1.0 >>> adx.twobody.ufunc5(chi, alpha) Array([0.2426..., 1.6411...], dtype=float32)