Hill-Clohessy-Wiltshire Dynamics¶
For a chief satellite on a circular orbit with mean motion \(n = \sqrt{\mu / a^3}\), the linearised equations of relative motion (HCW model) are:
hcw_derivative returns the 6-element state derivative
\([\dot{x}, \dot{y}, \dot{z}, \ddot{x}, \ddot{y}, \ddot{z}]\) and is
designed to plug directly into a numerical integrator:
import jax.numpy as jnp
from astrojax.constants import R_EARTH, GM_EARTH
from astrojax.relative_motion import hcw_derivative
sma = R_EARTH + 500e3
n = jnp.sqrt(GM_EARTH / sma**3)
state = jnp.array([100.0, 0.0, 0.0, 0.0, 0.0, 0.0])
deriv = hcw_derivative(state, n)
Because it is a pure JAX function, hcw_derivative is compatible with
jax.jit, jax.vmap, and jax.grad, making it suitable for batched
simulation and differentiable control.
State Transition Matrix¶
Because the HCW equations are linear and time-invariant, the system \(\dot{\mathbf{x}} = A\mathbf{x}\) has a closed-form state transition matrix \(\Phi(t) = e^{At}\) that maps an initial state directly to the state at elapsed time \(t\):
Writing \(c = \cos(nt)\) and \(s = \sin(nt)\), the 6 \(\times\) 6 matrix is:
hcw_stm returns this matrix and can be used for fast, exact
propagation without numerical integration:
import jax.numpy as jnp
from astrojax.constants import R_EARTH, GM_EARTH
from astrojax.relative_motion import hcw_stm
sma = R_EARTH + 500e3
n = jnp.sqrt(GM_EARTH / sma**3)
state0 = jnp.array([100.0, 0.0, 0.0, 0.0, 0.0, 0.0])
state_10min = hcw_stm(600.0, n) @ state0
The STM satisfies the semigroup (composition) property: \(\Phi(t_1 + t_2) = \Phi(t_2)\,\Phi(t_1)\). This means you can chain shorter propagation steps without accumulating integration error. It is also volume-preserving (\(\det\Phi = 1\)), as expected for a Hamiltonian system.