EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::SwitchingMeasurement< Path_, Measurements > Class Template Reference

A measurement that switches between modes: one Measurement per value of a mode axis, so that a filter over a Hybrid updates each mode by the measurement that its value in that axis names [imm]. More...

#include <EmrysFilter/Models/SwitchingModel.h>

Public Types

using PathType = Path_
 the mode axis that selects the measurement
template<std::size_t I>
using MeasurementType = std::tuple_element_t<I, std::tuple<Measurements...>>
 Measurement I, for value I of the axis.

Public Member Functions

 SwitchingMeasurement (Measurements... measurements)
 measurements, one per value of the axis Path_, in order.
template<std::size_t I>
MeasurementType< I > const & measurement () const
template<typename F>
decltype(auto) visit (std::size_t value, F &&f) const

Static Public Attributes

static constexpr std::size_t Count = sizeof...(Measurements)
 the number of measurements

Detailed Description

template<typename Path_, Measurement... Measurements>
class Emrys::SwitchingMeasurement< Path_, Measurements >

A measurement that switches between modes: one Measurement per value of a mode axis, so that a filter over a Hybrid updates each mode by the measurement that its value in that axis names [imm].

A sensor may see the state differently in each mode: with a bias or a scale factor that the mode sets, through a function that holds in one regime only, or not at all, when a blocked sensor reads clutter. switchingMeasurement<Sensor>(nominal, biased) on a mode space DiscreteProduct<Maneuver, Sensor> updates each mode whose Sensor value is the first by nominal and each other mode by biased, and each mode's own likelihood \( p(z \mid m) \) reweights it. The measurements may differ in model, function, noise, and method, as long as every mode's update has one type: one measurement space, and noise that is Gaussian in all of them or a mixture in all of them. None of them has noise by mode axis.

It is the counterpart of SwitchingModel for an update: where switchingModel<Maneuver>() selects the dynamics by an axis, switchingMeasurement<Sensor>() selects the measurement. Noise by mode axis, additiveNoise(mixture).byMode<Sensor>() (see ModeNoise), is the case in which the measurements differ in their noise alone, the components of one measurement's mixture noise being the axis's values.

Template Parameters
Path_the mode axis that selects the measurement, as a tag or TagPath
Measurementsthe measurements, in the order of the axis's values
See also
switchingMeasurement(), SwitchingModel, ImmFilter

Member Function Documentation

◆ measurement()

template<typename Path_, Measurement... Measurements>
template<std::size_t I>
MeasurementType< I > const & Emrys::SwitchingMeasurement< Path_, Measurements >::measurement ( ) const
inlinenodiscard
Returns
measurement I, for value I of the axis

◆ visit()

template<typename Path_, Measurement... Measurements>
template<typename F>
decltype(auto) Emrys::SwitchingMeasurement< Path_, Measurements >::visit ( std::size_t value,
F && f ) const
inline
Returns
f applied to the measurement for value value of the axis, which is less than Count; f returns one type for every measurement

The documentation for this class was generated from the following file: