Documentation / @interstellar-tools/equations / cwPropagate
Function: cwPropagate()
ts
function cwPropagate(state: CwState, n: number, t: number): CwState;Defined in: orbits/cw-propagate.ts:52
Propagate a Clohessy–Wiltshire / Hill relative state in closed form.
with
Units
- Inputs:
statepositions in m and velocities in m/s,nin rad/s,tin s. - Output: the state at
t, in the same units.
Notes
- The exact solution of the equations cwHillDerivatives gives to a numerical integrator: no step size, no accumulated error.
- Same LVLH frame and
CwStatelayout ascwHillDerivatives:[x, y, z, xDot, yDot, zDot], withradial, along-track, cross-track. - A state with
has no along-track drift: it traces a closed ellipse around the chief.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | CwState | Relative state [x, y, z, xDot, yDot, zDot] (finite). |
n | number | Mean motion of the circular reference orbit in rad/s (finite, > 0). |
t | number | Time to propagate in s (finite; negative goes backwards). |
Returns
The relative state at t.
Throws
- If any input is not a finite number.
- If
n <= 0.
Example
ts
import type { CwState } from '@interstellar-tools/types';
// 100 m below the chief with no drift: back where it started after one orbit
const n = 0.00113;
const start: CwState = [-100, 0, 0, 0, 2 * n * 100, 0];
const later = cwPropagate(start, n, (2 * Math.PI) / n);
// later ≈ start