Skip to content

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.

(rv)(t)=[ΦrrΦrvΦvrΦvv](r0v0)

with Φ(t) from cwStateTransition.

Units

  • Inputs: state positions in m and velocities in m/s, n in rad/s, t in 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 CwState layout as cwHillDerivatives: [x, y, z, xDot, yDot, zDot], with x radial, y along-track, z cross-track.
  • A state with y˙0=−2nx0 has no along-track drift: it traces a closed ellipse around the chief.

Parameters ​

ParameterTypeDescription
stateCwStateRelative state [x, y, z, xDot, yDot, zDot] (finite).
nnumberMean motion of the circular reference orbit in rad/s (finite, > 0).
tnumberTime to propagate in s (finite; negative goes backwards).

Returns ​

CwState

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

See ​