astrodynx.twobody.dxdx0#
- astrodynx.twobody.dxdx0(r_vec, v_vec, r0_vec, v0_vec, deltat=3.14, mu=1)[source]#
The State Transition Matrix.
- Parameters:
r_vec (
ArrayLike) – (3,) The position vector at the current time.v_vec (
ArrayLike) – (3,) The velocity vector at the current time.r0_vec (
ArrayLike) – (3,) The position vector at the initial time.v0_vec (
ArrayLike) – (3,) The velocity vector at the initial time.deltat (
DTypeLike) – (optional) The time since the initial time.mu (
DTypeLike) – (optional) The gravitational parameter.
- Return type:
- Returns:
The State Transition Matrix.
Notes
The State Transition Matrix is defined as:
\[\begin{split} \frac{d\boldsymbol{x}}{d\boldsymbol{x}_0} = \begin{bmatrix} \frac{d\boldsymbol{r}}{d\boldsymbol{r}_0} & \frac{d\boldsymbol{r}}{d\boldsymbol{v}_0} \\ \frac{d\boldsymbol{v}}{d\boldsymbol{r}_0} & \frac{d\boldsymbol{v}}{d\boldsymbol{v}_0} \end{bmatrix} \end{split}\]where \(\boldsymbol{x} = [\boldsymbol{r}, \boldsymbol{v}]^T\) is the state vector, \(\boldsymbol{x}_0 = [\boldsymbol{r}_0, \boldsymbol{v}_0]^T\) is the initial state vector, and \(\frac{d\boldsymbol{x}}{d\boldsymbol{x}_0}\) is the State Transition Matrix.References
Battin, 1999, pp.180.
Examples
A simple example:
>>> import jax.numpy as jnp >>> import astrodynx as adx >>> r_vec = jnp.array([-0.24986234273434585, -0.69332384278075210, 4.9599012168662551e-3]) >>> v_vec = jnp.array([ 1.2189179487500401, 0.05977450696618754, -0.007101943980682161]) >>> r0_vec = jnp.array([-0.66234662571997105, 0.74919751798749190, -1.6259997018919074e-4]) >>> v0_vec = jnp.array([-0.8166746784630675, -0.32961417380268476, 0.006248107587795581]) >>> deltat = 2.5803148345055149 >>> mu = 1.0 >>> expected = jnp.array([[ 6.96499107e+00, -4.49913836e+00, -1.89246497e-02, 7.59769798e+00, -5.23072188e-01, -3.53190183e-02,], ... [ 1.51857748e+00, -1.52804032e+00, -3.60174714e-03, 2.52883087e+00, 1.17277875e+00, -1.61237785e-02,], ... [-4.98856694e-02, 2.99417750e-02, -5.82723061e-01, -5.10209945e-02, 8.87921668e-04, 7.78936443e-01,], ... [ 4.75150081e+00, -3.53238392e+00, -1.06813429e-02, 6.32244923e+00, 1.13091953e+00, -4.74582385e-02,], ... [ 8.76182663e+00, -6.69223965e+00, -1.65955664e-02, 1.00231736e+01, -5.74210092e-02, -6.14800215e-02,], ... [-7.39347940e-02, 5.19339444e-02, -4.25016825e-01, -9.32086959e-02, -1.19134537e-02, -1.14713870e+00]]) >>> jnp.allclose(adx.twobody.dxdx0(r_vec, v_vec, r0_vec, v0_vec, deltat), expected) Array(True, dtype=bool)