Class JointOrbitClockState

Inheritance Relationships

Base Type

Class Documentation

class JointOrbitClockState : public lupnt::State

Combined Cartesian orbit (position+velocity) and 2- or 3-state clock state, stacked as [r, v, b, d, (dr)].

This is the state type propagated by JointOrbitClockDynamics, which integrates a spacecraft’s orbital dynamics together with its onboard clock model in a single state vector (e.g. for GNSS/measurement pipelines that need a self-consistent orbit + clock-bias estimate).

Public Functions

inline JointOrbitClockState()

Construct a zero-initialized state with a 3-state clock (bias, drift, drift-rate), in frame MOON_CI.

inline explicit JointOrbitClockState(int clock_size)

Construct a zero-initialized state with a clock of the given size (2 or 3 states), in frame MOON_CI.

Parameters:

clock_size – Number of clock states: 2 (bias, drift) or 3 (bias, drift, drift-rate).

inline JointOrbitClockState(const State &x)

Reinterpret a generic State as a JointOrbitClockState, checking its size (8 or 9) and (re-)labeling it if it isn’t already fully named/unit-tagged. Used by JointOrbitClockDynamics::Propagate to wrap the raw propagated vector.

Parameters:

x – 8- or 9-element state: [r(3), v(3), b, d, (dr)].

inline JointOrbitClockState(const State &orbit_state, const State &clock_state)

Construct a JointOrbitClockState by concatenating a separate 6-element orbit state and a 2- or 3-element clock state. Used to build the initial joint state from Cart6 + ClockState2/ClockState3 before propagation by JointOrbitClockDynamics.

Parameters:
  • orbit_state – 6-element Cartesian [r; v] state.

  • clock_state – 2- or 3-element clock state [b, d, (dr)].

inline JointOrbitClockState &operator=(const State &x)

Assign from a generic State, checking its size (8 or 9) and copying its values and frame.

inline int GetOrbitStateSize() const

Size of the orbit (Cartesian) portion of the state.

Returns:

Always 6.

inline int GetClockStateSize() const

Size of the clock portion of the state.

Returns:

2 or 3.

inline Cart6 GetOrbitState() const

Extract the Cartesian orbit sub-state.

Returns:

Cart6 containing [r; v] in this state’s frame.

inline State GetClockState() const

Extract the clock sub-state.

Returns:

State of type “ClockState” containing [b, d, (dr)] with the corresponding units, in this state’s frame.

inline void SetOrbitState(const State &orbit_state)

Overwrite the orbit sub-state (and this state’s frame) from orbit_state, leaving the clock sub-state unchanged.

Parameters:

orbit_state – 6-element Cartesian [r; v] state.

inline void SetClockState(const State &clock_state)

Overwrite the clock sub-state (and its units) from clock_state, leaving the orbit sub-state unchanged.

Parameters:

clock_stateClock state matching this state’s clock size (GetClockStateSize()).

inline Eigen::Ref<Vec3> r()

Mutable view of the position sub-vector.

Returns:

Position [m].

inline Eigen::Ref<Vec3> v()

Mutable view of the velocity sub-vector.

Returns:

Velocity [m/s].

inline Real &b()

Mutable reference to the clock bias.

Returns:

Clock bias [s].

inline Real &d()

Mutable reference to the clock drift.

Returns:

Clock drift [s/s].

inline Real &dr()

Mutable reference to the clock drift-rate. Only valid when GetClockStateSize() == 3.

Returns:

Clock drift-rate [s/s^2].

inline Vec3 r() const

Position sub-vector.

Returns:

Position [m].

inline Vec3 v() const

Velocity sub-vector.

Returns:

Velocity [m/s].

inline Real b() const

Clock bias.

Returns:

Clock bias [s].

inline Real d() const

Clock drift.

Returns:

Clock drift [s/s].

inline Real dr() const

Clock drift-rate. Only valid when GetClockStateSize() == 3.

Returns:

Clock drift-rate [s/s^2].

Public Static Attributes

static StateType TYPE = "JointOrbitClock"