Class GnssMeasurement

Inheritance Relationships

Base Type

Class Documentation

class GnssMeasurement : public lupnt::MeasurementClone<GnssMeasurement>

Single-channel GNSS measurement model (Measurement subclass).

Its Config is GnssMeasurementOptions (observable selection, state-index layout, clock-bias unit, frame, and light-time/relativity/Shapiro/plasma correction settings), stored as a member and consumed by the Measurement interface methods (Compute/CreateFunction). The explicit-config overloads ComputeValue/ComputeVector remain available for callers (e.g. the Lunar-GNSS ODTS combined/TDCP model) that vary the config per invocation.

Public Types

using Config = GnssMeasurementOptions

The measurement model’s configuration type (observable selection, state mapping, correction settings). Alias of GnssMeasurementOptions.

Public Functions

GnssMeasurement() = default
explicit GnssMeasurement(const GnssChannel &channel)

Construct a single-channel GNSS measurement from a (typically precomputed) GnssChannel.

Used by GNSSMeasurements::ComputeFromChannels to wrap each transmitter channel built by BuildChannels before computing its pseudorange/Doppler/carrier-phase observables.

GnssMeasurement(const GnssChannel &channel, GnssMeasurementOptions options)

Construct from a channel and an explicit measurement config.

inline void SetChannel(const GnssChannel &channel)

Replace the GNSS channel (transmitter ephemeris, clock, and delay terms) used by ComputeValue()/ComputeVector().

inline const GnssChannel &GetChannel() const

Get the GNSS channel currently associated with this measurement.

inline void SetOptions(const GnssMeasurementOptions &options)

Replace the measurement config used by the Measurement interface methods.

inline const GnssMeasurementOptions &GetOptions() const

Get the measurement config currently in use.

GnssMeasurementValue ComputeValue(const State &user_state, const GnssMeasurementOptions &options = {}) const

Compute the pseudorange, Doppler, and carrier-phase values implied by a user (receiver) state and this measurement’s channel.

This is the core GNSS observation model used throughout the module: GnssMeasurement::Compute calls this to build the measurement vector, and GNSSMeasurements::ComputeFromChannels calls it per-channel when assembling a GNSSMeasurementsEpoch. It forms the geometric range/range-rate between user_state and the (light-time- and relativity-corrected) transmitter state, then applies the receiver and effective-transmitter clock bias/drift and the channel’s Shapiro-delay/ionosphere-plasma corrections (added for the code/ pseudorange observable, subtracted for the carrier-phase observable, per the standard dispersive-vs-non-dispersive sign convention).

Parameters:
  • user_stateReceiver state vector; must contain position and velocity at options.indices.position/velocity [m, m/s] in options.frame, and optionally receiver clock bias/drift and carrier-integer-ambiguity states at the other indices entries

  • options – Observable selection, state-index layout, clock-bias unit, and light-time/relativity/Shapiro/plasma correction settings

Returns:

GnssMeasurementValue with pseudorange [m], Doppler [Hz], and carrier-phase [cycles] (plus the carrier integer ambiguity)

VecXd ComputeVector(const State &user_state, MatXd *H = nullptr, const GnssMeasurementOptions &options = {}) const

Compute the GNSS measurement vector (and, optionally, its Jacobian) for the observables selected in options.

The explicit-config workhorse behind the Measurement interface: it evaluates y = h(x) and H = dh/dx for one GNSS channel. Internally calls ComputeValue() for y, and (if H is requested) differentiates the range/range-rate/carrier-phase model analytically with respect to receiver position, velocity, clock bias/drift, and carrier-integer state, per the observables in options.observables.

Parameters:
  • user_stateReceiver state vector, as in ComputeValue()

  • H[out] If non-null, filled with the observables.size() x user_state.size() Jacobian of y with respect to user_state

  • options – Same options as ComputeValue()

Returns:

Measurement vector y, one entry per options.observables [m, Hz, or cycles depending on entry]

virtual MeasData Compute(const State &x, MatXd *H = nullptr) const override

Measurement interface: predict z = h(x), R, and (if H != nullptr) the analytic Jacobian H = dh/dx, using the stored config GetOptions().

The diagonal R covariance is built from GetChannel()’s sigma_pseudorange_m/sigma_doppler_hz/sigma_carrier_phase_cycles (each defaulted to 1 if not finite/positive). CreateFunction() (inherited) wraps this into a FilterMeasurementFunction for direct use with the Filter family.

Public Static Functions

static std::vector<GNSSMeasurementsEpoch> Precompute(const GNSSMeasurements &measurements, const std::vector<Real> &receive_times, const std::vector<State> &user_states, bool compute_jacobians = false)

Batch-compute a GNSSMeasurementsEpoch (channels + values [+ Jacobians]) for each given receive time / user state pair.

Thin wrapper around GNSSMeasurements::Compute used to generate a time series of GNSS measurement epochs (e.g. for truth-data generation or batch filter processing) without manually looping over receive_times/user_states.

Parameters:
  • measurements – Configured GNSSMeasurements (constellation, options, antennas, etc.) used to build channels

  • receive_timesReceiver signal-reception epochs [s, measurements.GetOptions().receive_time_scale]

  • user_statesReceiver states at each receive_times entry, one-to-one with receive_times

  • compute_jacobians – If true, also compute and store each epoch’s measurement Jacobian

Returns:

One GNSSMeasurementsEpoch per receive_times entry