astrodynx.twobody.ufunc1#
- astrodynx.twobody.ufunc1(chi, alpha)[source]#
The universal function U1
- Parameters:
- Return type:
- Returns:
The value of the universal function U1.
Notes
The universal function U1 is defined as:
\[\begin{split} U_1(\chi, \alpha) = \begin{cases} \frac{\sin(\sqrt{\alpha} \chi)}{\sqrt{\alpha}} & \alpha > 0 \\ \frac{\sinh(\sqrt{-\alpha} \chi)}{\sqrt{-\alpha}} & \alpha < 0 \\ \chi & \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.180.
Examples
A simple example:
>>> import jax.numpy as jnp >>> import astrodynx as adx >>> chi = 1.0 >>> alpha = 1.0 >>> adx.twobody.ufunc1(chi, alpha) Array(0.8414..., dtype=float32, weak_type=True)
With broadcasting:
>>> chi = jnp.array([1.0, 2.0]) >>> alpha = 1.0 >>> adx.twobody.ufunc1(chi, alpha) Array([0.8414..., 0.9092...], dtype=float32)