Class JointOrbitClockDynamics

Inheritance Relationships

Base Type

Class Documentation

class JointOrbitClockDynamics : public lupnt::NumericalDynamics

Numerical dynamics for a Cartesian orbit state coupled to a clock state.

The state layout is [r, v, b, d] or [r, v, b, d, dr]. The orbit part is propagated by an owned NumericalDynamics model. The clock part follows the same bias-unit convention as ClockDynamics, with an optional relativistic rate correction from the selected central body.

Public Functions

JointOrbitClockDynamics()

Construct with default (unset) orbit dynamics and a default ClockDynamics.

Installs ComputeRates as the integration ODE via SetODE.

explicit JointOrbitClockDynamics(Config &config)

Construct from a YAML configuration node.

Reads the nested orbit_dynamics config (constructed via the Dynamics/NumericalDynamics asset factory and required to derive from NumericalDynamics), the nested clock_dynamics config, and the clock_bias_unit/bias_unit, use_clock_relativity/use_relativity, relativity_center_body, reference_rate_offset, add_clock_noise, and frame fields.

void SetOrbitDynamics(Ptr<NumericalDynamics> orbit_dynamics)

Set the underlying orbit (position/velocity) dynamics model.

Adopts the orbit dynamics’ parameters (SetParams) and, if it is an NBodyDynamics, also adopts its integration frame and unit system.

Parameters:

orbit_dynamics – Orbit dynamics model (must be non-null).

inline Ptr<NumericalDynamics> GetOrbitDynamics() const

Return the configured orbit dynamics model.

void SetClockDynamics(Ptr<ClockDynamics> clock_dynamics)

Set the clock-bias propagation model (must be non-null).

inline Ptr<ClockDynamics> GetClockDynamics() const

Return the configured clock-bias propagation model.

inline void SetUseClockRelativity(bool use_clock_relativity)

Enable/disable the relativistic clock-rate coupling (RelativisticRate) in ComputeRates.

inline bool GetUseClockRelativity() const

Return whether relativistic clock-rate coupling is enabled.

inline void SetRelativityCenterBody(BodyId center_body)

Fix the relativity center body used by SelectRelativityCenter, overriding automatic selection.

inline BodyId GetRelativityCenterBody() const

Return the configured relativity center body (only meaningful if HasRelativityCenterBody() is true).

inline bool HasRelativityCenterBody() const

Return whether a fixed relativity center body has been set via SetRelativityCenterBody.

inline void ClearRelativityCenterBody()

Clear a fixed relativity center body, reverting to automatic selection (SelectRelativityCenter).

inline void SetReferenceRateOffset(Real reference_rate_offset)

Set a constant offset added to the relativistic clock-rate correction (see ClockDynamics::RelativisticRateCorrection).

inline Real GetReferenceRateOffset() const

Return the configured relativistic clock-rate reference offset.

inline void SetAddClockNoise(bool add_clock_noise)

Enable/disable adding stochastic clock process noise during Propagate.

inline bool GetAddClockNoise() const

Return whether stochastic clock process noise is added during Propagate.

inline void SetFrame(Frame frame)

Set the integration frame for the orbit portion of the joint state.

inline Frame GetFrame() const

Return the configured integration frame.

inline void SetUnits(const UnitSystem &units)

Set the unit system used for the orbit portion of the joint state.

inline UnitSystem GetUnits() const

Return the configured unit system.

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

Numerically propagate the coupled orbit+clock state over [t0, tf].

Integrates ComputeRates via NumericalDynamics::Propagate (skipping integration if |tf - t0| < EPS), then if add_clock_noise_ and a clock model is configured, adds a sample of clock process noise (clock_dynamics_->GetProcessNoise) to the clock portion of the propagated state. Used by the filter time-update step (filters/) and by applications/ to propagate a satellite’s coupled position/velocity/clock-bias state.

Parameters:
  • x0 – Initial JointOrbitClockState ([r, v, b, d] or [r, v, b, d, dr]) at time t0.

  • t0 – Initial epoch [s, TDB since J2000].

  • tf – Final epoch [s, TDB since J2000].

  • u – Unused; must be nullptr (no control input supported).

Returns:

Propagated JointOrbitClockState at time tf.

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

Propagate the joint orbit+clock state after installing params on both this dynamics object and the underlying orbit dynamics.

Calls orbit_dynamics_->SetParams(params) and SetParams(params), then Propagate(x0, t0, tf, u). Used by filters estimating orbit force-model parameters (e.g. SRP/drag coefficients) jointly with the orbit+clock state.

Parameters:
  • x0 – Initial JointOrbitClockState at time t0.

  • t0 – Initial epoch [s, TDB since J2000].

  • tf – Final epoch [s, TDB since J2000].

  • params – Orbit-dynamics parameter values/names to install before propagating.

  • u – Unused; must be nullptr.

Returns:

Propagated JointOrbitClockState at time tf.

virtual VecX ComputeRates(Real t, const State &x) const override

Compute the time derivative of the coupled orbit+clock state.

Splits x into the orbit portion (head(ORBIT_STATE_SIZE), tagged with frame_ or x’s frame) and the clock portion, computes orbit rates via orbit_dynamics_->ComputeRates, computes the relativistic clock-rate term via RelativisticRate (if use_clock_relativity_), and forms the clock-state derivative as [drift + relativistic_rate, drift_rate, 0] (2-state: [drift + relativistic_rate, 0]). Installed as the integration ODE (via SetODE in the constructors) and called once per integration step by the integrators in numerics/integrator.h.

Parameters:
Returns:

Time derivative of x, same layout/units as x.

inline virtual StateType GetStateType() const override

Return JointOrbitClockState::TYPE, the coupled orbit+clock state type propagated by this model.