Class JointOrbitClockDynamics¶
Defined in File joint_orbit_clock_dynamics.h
Inheritance Relationships¶
Base Type¶
public lupnt::NumericalDynamics(Class NumericalDynamics)
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
ComputeRatesas the integration ODE viaSetODE.
-
explicit JointOrbitClockDynamics(Config &config)¶
Construct from a YAML configuration node.
Reads the nested
orbit_dynamicsconfig (constructed via theDynamics/NumericalDynamicsasset factory and required to derive fromNumericalDynamics), the nestedclock_dynamicsconfig, and theclock_bias_unit/bias_unit,use_clock_relativity/use_relativity,relativity_center_body,reference_rate_offset,add_clock_noise, andframefields.
-
void SetOrbitDynamics(Ptr<NumericalDynamics> orbit_dynamics)¶
Set the underlying orbit (position/velocity) dynamics model.
Adopts the orbit dynamics’ parameters (
SetParams) and, if it is anNBodyDynamics, 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 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
ComputeRatesviaNumericalDynamics::Propagate(skipping integration if|tf - t0| < EPS), then ifadd_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 timet0.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
JointOrbitClockStateat timetf.
-
virtual State PropagateWithParams(const State &x0, Real t0, Real tf, const ParamState ¶ms, const State *u = nullptr) override¶
Propagate the joint orbit+clock state after installing
paramson both this dynamics object and the underlying orbit dynamics.Calls
orbit_dynamics_->SetParams(params)andSetParams(params), thenPropagate(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
JointOrbitClockStateat timet0.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
JointOrbitClockStateat timetf.
-
virtual VecX ComputeRates(Real t, const State &x) const override¶
Compute the time derivative of the coupled orbit+clock state.
Splits
xinto the orbit portion (head(ORBIT_STATE_SIZE), tagged withframe_orx’s frame) and the clock portion, computes orbit rates viaorbit_dynamics_->ComputeRates, computes the relativistic clock-rate term via RelativisticRate (ifuse_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 (viaSetODEin the constructors) and called once per integration step by the integrators in numerics/integrator.h.- Parameters:
t – Time argument [s] (as used by
ComputeRates/SetODE, i.e. relative toGetLupntEpoch()).x – Current
JointOrbitClockState(8- or 9-element).
- Returns:
Time derivative of
x, same layout/units asx.
-
inline virtual StateType GetStateType() const override¶
Return
JointOrbitClockState::TYPE, the coupled orbit+clock state type propagated by this model.
-
JointOrbitClockDynamics()¶