astrodynx.twobody.is_short_way#
- astrodynx.twobody.is_short_way(r1, v1, r2)[source]#
Returns True if the short way between two points in an orbit is taken.
- Parameters:
- Return type:
- Returns:
True if the short way between the two points is taken, False otherwise.
Notes
The short way is taken only if:
\[ (\boldsymbol{r}_1 \times \boldsymbol{v}_1) \cdot (\boldsymbol{r}_1 \times \boldsymbol{r}_2) > 0 \]Examples
A simple example:
>>> import jax.numpy as jnp >>> import astrodynx as adx >>> r1 = jnp.array([1.0, 0.0, 0.0]) >>> v1 = jnp.array([0.0, 1.0, 0.0]) >>> r2 = jnp.array([0.0, 1.0, 0.0]) >>> adx.twobody.is_short_way(r1, v1, r2) Array(True, dtype=bool)