astrodynx.twobody.pass_perigee#
- astrodynx.twobody.pass_perigee(r1, v1, r2, mu=1)[source]#
Returns True if the orbit passes through perigee between two points.
- Parameters:
- Return type:
- Returns:
True if the orbit passes through perigee between the two points, False otherwise.
Notes
Let’s define
\[ \boldsymbol{b}_1 = (\boldsymbol{r}_1 \times \boldsymbol{r}_2) \cdot (\boldsymbol{r}_1 \times \boldsymbol{e}) > 0 \]and\[ \boldsymbol{b}_2 = (\boldsymbol{r}_1 \times \boldsymbol{r}_2) \cdot (\boldsymbol{e} \times \boldsymbol{r}_2) > 0 \]where \(\boldsymbol{e}\) is the eccentricity vector. Then, the orbit passes through perigee if:\[ \boldsymbol{b}_1 \land \boldsymbol{b}_2 = \text{is_short_way}(\boldsymbol{r}_1, \boldsymbol{v}_1, \boldsymbol{r}_2) \]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.pass_perigee(r1, v1, r2) Array(False, dtype=bool)