Class Measurement

Inheritance Relationships

Derived Types

Class Documentation

class Measurement

Abstract base class for a measurement model driven by a filter State vector.

A concrete Measurement owns its own measurement-model math and configuration (settings + state-index mapping, typically a nested Config). It maps an estimation State to a predicted observable vector z = h(x), optionally with its Jacobian H = dh/dx (Compute, with an optional H output), and can wrap itself into a FilterMeasurementFunction for direct use with the Filter family (CreateFunction).

This is the base for state-vector measurements (GNSS, inter-satellite crosslinks, ground-station range/range-rate, etc.). Error-state (INS) measurements, whose Jacobian is taken with respect to a nav error state and depends on attitude, use the parallel ErrorStateMeasurement base instead.

Subclassed by lupnt::MeasurementClone< GnssMeasurement >, lupnt::MeasurementClone< GroundStationRangeMeasurement >, lupnt::MeasurementClone< IslCrosslinkMeasurement >, lupnt::MeasurementClone< LunarGnssCombinedMeasurement >, lupnt::MeasurementClone< Derived >

Public Functions

virtual ~Measurement() = default
virtual MeasData Compute(const State &x, MatXd *H = nullptr) const = 0

Predict the measurement z = h(x), its noise covariance R, and (if H != nullptr) the measurement Jacobian H = dh/dx sized n_z x x.size().

Parameters:
  • x – Estimation state.

  • H[out] If non-null, filled with the measurement Jacobian; if null, only the value and covariance are computed.

Returns:

MeasData with value = z and covariance = R.

virtual Ptr<Measurement> Clone() const = 0

Polymorphic deep copy so CreateFunction’s closure can own an independent copy of this model (avoids dangling references / slicing).

inline virtual FilterMeasurementFunction CreateFunction() const

Wrap this model into a FilterMeasurementFunction (x, H, R) -> z suitable for Filter::SetMeasurementFunction.

The default implementation captures a Clone() of this model and forwards to Compute(x, H), copying the returned MeasData::covariance into R. Subclasses may override for specialized covariance/Jacobian handling.