Class ClohessyWiltshireDynamics

Inheritance Relationships

Base Type

Class Documentation

class ClohessyWiltshireDynamics : public lupnt::AnalyticalDynamics

Clohessy-Wiltshire (linearized two-body relative motion) propagation of a chief-relative Cartesian state.

Propagates a RelCart6 (relative position/velocity, e.g. in the chief’s RTN frame) using the analytic CW state transition matrix for a circular reference orbit of semi-major axis a and mean motion n. Used for fast formation-flying / rendezvous relative-motion propagation where the CW linearization (circular reference, small separation) is adequate.

Public Functions

ClohessyWiltshireDynamics(Real a, Real n)

Construct with the chief orbit’s semi-major axis and mean motion.

Parameters:
  • a – Chief orbit semi-major axis [m or consistent length unit].

  • n – Chief orbit mean motion [rad/s].

Mat6 ComputeMat(Real tf)

Compute the Clohessy-Wiltshire state transition matrix for elapsed time tf.

Returns Phi = A * B(n_*tf) mapping the integration-constant vector K_ (solved for at the first call to Propagate) to the relative state at t0_ + tf.

Parameters:

tf – Elapsed time since t0_ [s].

Returns:

6x6 CW state transition matrix.

virtual State Propagate(const State &state, Real t0, Real tf, const State *u, MatXd *stm) override

Propagate the relative Cartesian state using the Clohessy-Wiltshire solution.

On the first call (or whenever t0 changes), solves for the CW integration constants K_ from x0 via ComputeMat(t0), then evaluates xf = ComputeMat(tf - t0) * K_.

Parameters:
  • state – Initial relative Cartesian state (RelCart6) at time t0.

  • t0 – Initial epoch [s].

  • tf – Final epoch [s].

  • u – Unused (no control input).

  • stm – Output: CW state transition matrix d(xf)/d(x0); left unmodified if nullptr.

Returns:

Propagated relative Cartesian state at time tf.

inline virtual StateType GetStateType() const override

Return RelCart6::TYPE, the relative-position/velocity state type propagated by this model.

virtual State Propagate(const State &x0, Real t0, Real tf, const State *u = nullptr) override

Propagate the state from t0 to tf without computing a state transition matrix.

Forwards to Propagate(x0, t0, tf, u, nullptr).

Parameters:
  • x0 – Initial state at time t0.

  • t0 – Initial epoch [s].

  • tf – Final epoch [s].

  • u – Optional control/forcing input; unused by analytic propagators.

Returns:

Propagated state at time tf.

virtual MatX Propagate(const State &x0, const VecX &tfs, const State *u = nullptr) override

Propagate the state to a sequence of output epochs, all relative to the initial epoch tfs(0).

Unlike the generic Dynamics::Propagate(x0, tfs, u), each output row is computed directly as Propagate(x0, tfs(0), tfs(i), u) (parallelized with OpenMP), exploiting the fact that analytic propagators can jump to any tf in one step without re-using the previous step’s result.

Parameters:
  • x0 – Initial state at tfs(0).

  • tfs – Vector of output epochs [s], including the initial epoch as tfs(0).

  • u – Optional control/forcing input; unused by analytic propagators.

Returns:

Matrix whose i-th row is the propagated state at tfs(i).