|
EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
|
Process models as functions with reads and writes (decisions.md [model-policies], [continuous-time-noise], [prediction-inputs], [time-steps]): the ProcessFunction that processModel() builds from a function and its policies; the built-in models RandomWalk, the Kinematic chains ConstantVelocity and ConstantAcceleration, OrnsteinUhlenbeck, and Constant, each the same object; compose(), which puts process models side by side; the ProcessModel concept; predict(), which moves a Gaussian through one by any transform method with the discretized process noise added, and predictJoint(), which also keeps the Gaussian it started from and its cross-covariance with the prediction, a PredictedJoint, which is what a smoother records [smoothing]; propagate(), the noise-free step; and FixedStepModel, a model over one step with the work that depends only on the step done once. More...
#include <array>#include <cstddef>#include <optional>#include <tuple>#include <type_traits>#include <utility>#include <Eigen/LU>#include <EmrysFilter/Core/Forwarding.h>#include <EmrysFilter/Core/Macros.h>#include <EmrysFilter/Core/Math.h>#include <EmrysFilter/Core/Multiply.h>#include <EmrysFilter/Core/Solve.h>#include <EmrysFilter/Core/Time.h>#include <EmrysFilter/Distributions/Gaussian.h>#include <EmrysFilter/Distributions/Moments.h>#include <EmrysFilter/Distributions/Sampling.h>#include <EmrysFilter/Models/Batched.h>#include <EmrysFilter/Models/MeasurementModel.h>#include <EmrysFilter/Models/Methods.h>#include <EmrysFilter/Models/Policies.h>#include <EmrysFilter/Models/ResolvedReads.h>#include <EmrysFilter/Models/Transform.h>#include <EmrysFilter/Spaces/Composite.h>#include <EmrysFilter/Spaces/Space.h>#include <EmrysFilter/Spaces/Subspace.h>#include <EmrysFilter/Spaces/TagPath.h>Go to the source code of this file.
Classes | |
| class | Emrys::ProcessFunction< F, Policies > |
| A process model: a function \( f \) of its input and the step, with the policies that say what it reads, what it writes, and what it is affine in, and its noise (decisions.md [model-policies], [continuous-time-noise]). More... | |
| class | Emrys::RandomWalk< Path, Scalar_ > |
| A model driven by white noise alone: \( x' = x \), with noise \( Q_c \, \Delta t \) on its differences. More... | |
| class | Emrys::Kinematic< Scalar_, Paths > |
| A chain of two or more derivatives whose last one is driven by white noise: constant velocity and constant acceleration. More... | |
| struct | Emrys::TimeConstant< Scalar > |
| The time constant \( \tau \) of an OrnsteinUhlenbeck model, named so that it cannot be given in the place of its variance. More... | |
| struct | Emrys::StationaryVariance< Scalar > |
| The stationary variance \( \sigma^2 \) of an OrnsteinUhlenbeck model, named so that it cannot be given in the place of its time constant. More... | |
| class | Emrys::OrnsteinUhlenbeck< Path, Scalar_ > |
| A zero-mean Ornstein-Uhlenbeck (first-order Gauss-Markov) process on each coordinate of the block named by Path, such as a slowly varying sensor bias. More... | |
| class | Emrys::Constant< Path > |
| The block named by Path does not change, and has no process noise, such as a fixed calibration parameter. More... | |
| class | Emrys::Composition< Models > |
| Process models side by side, as compose() puts them (decisions.md [model-policies], [model-placement]): one model whose reads are the union of the parts', gathered once, whose writes are the parts' together, which must write every block of the state once, whose noise is block-diagonal, and whose affine set is the names every part reading them declares affine. More... | |
| struct | Emrys::NoProcessModel |
| The process model of a state with nothing to move: what a PointMassFilter, whose grid covers the whole state, holds in place of one. More... | |
| struct | Emrys::PredictedJoint< Space_, Scalar_ > |
| One prediction step as a joint: the Gaussian the step started from, the Gaussian it predicted, and the cross-covariance between them. More... | |
| struct | Emrys::ModelsMethod |
| What a filter with a fixed-step model takes in place of a prediction method: nothing, since the model carries its own. More... | |
| class | Emrys::UnboundFixedStep< Model_, Method_, Time_ > |
| A process model taken over one fixed time step, not yet bound to a state space: what fixedStep() returns. More... | |
| class | Emrys::FixedStepModel< Space_, Model_, Method_, Scalar_ > |
| A process model over one fixed time step, with the work that depends only on the step done once. More... | |
Concepts | |
| concept | Emrys::ProcessModel |
| A process model: what processModel() returns, a built-in model, or a composition of process models (decisions.md [model-policies]). | |
Typedefs | |
| template<typename Position, typename Velocity, RealScalar Scalar = double> | |
| using | Emrys::ConstantVelocity = Kinematic<Scalar, Position, Velocity> |
| Constant velocity (white-noise acceleration): position moves by velocity times \( \Delta t \). | |
| template<typename Position, typename Velocity, typename Acceleration, RealScalar Scalar = double> | |
| using | Emrys::ConstantAcceleration = Kinematic<Scalar, Position, Velocity, Acceleration> |
| Constant acceleration (white-noise jerk). | |
| template<typename Model> | |
| using | Emrys::DefaultMethodFor = typename internal::DefaultMethodOf<Model>::type |
| The prediction method of a filter with process model Model, unless it is given one: Linearized, a FixedStepModel's own, or, for a SwitchingModel of fixed-step models, which each carry their own, ModelsMethod. | |
| template<typename Model, typename Method> | |
| using | Emrys::MethodFor = std::conditional_t<isFixedStep<Model>, ModelsMethod, Method> |
| The type of a filter constructor's method argument: Method, or ModelsMethod for a fixed-step Model, so that a fixed-step filter can't be given a method. | |
Functions | |
| template<typename F, typename... Policies> requires (!MatrixExpression<F> && !internal::ModelPolicy<F>) | |
| auto | Emrys::processModel (F &&function, Policies &&... policies) |
| template<MatrixExpression Matrix, typename... Policies> | |
| auto | Emrys::processModel (Matrix &&matrix, Policies &&... policies) |
| template<ProcessModel... Models> | |
| Composition< std::remove_cvref_t< Models >... > | Emrys::compose (Models &&... models) |
| template<Space Space_, typename Derived, ProcessModel Model, typename... Args> | |
| Moments< Space_, typenameDerived::Scalar >::VectorType | Emrys::propagate (Space_ const &space, Eigen::MatrixBase< Derived > const &x, Model const &model, TimeStep< typename Derived::Scalar > auto const &dt, Args const &... args) |
| template<typename Method, UncertainInput Prior, ProcessModel Model, typename... Args> | |
| GaussianParams< typename Prior::SpaceType, typename Prior::Scalar > | Emrys::predict (Method const &method, Prior const &prior, Model const &model, TimeStep< typename Prior::Scalar > auto const &time, Args const &... args) |
| template<typename Method, UncertainInput Prior, ProcessModel Model, typename... Args> | |
| PredictedJoint< typename Prior::SpaceType, typename Prior::Scalar > | Emrys::predictJoint (Method const &method, Prior const &prior, Model const &model, TimeStep< typename Prior::Scalar > auto const &time, Args const &... args) |
| template<ProcessModel Model, typename Time, typename Method = methods::Linearized> requires TimeStep<Time, double> | |
| UnboundFixedStep< Model, Method, Time > | Emrys::fixedStep (Model model, Time dt, Method method={}) |
| template<UncertainInput Prior, typename Space_, typename Model_, typename Method_, typename Scalar_, typename... Args> | |
| GaussianParams< typename Prior::SpaceType, typename Prior::Scalar > | Emrys::predict (Prior const &prior, FixedStepModel< Space_, Model_, Method_, Scalar_ > const &model, Args const &... args) |
| template<UncertainInput Prior, typename Space_, typename Model_, typename Method_, typename Scalar_, typename... Args> | |
| PredictedJoint< typename Prior::SpaceType, typename Prior::Scalar > | Emrys::predictJoint (Prior const &prior, FixedStepModel< Space_, Model_, Method_, Scalar_ > const &model, Args const &... args) |
| template<UncertainInput Prior, typename Model_, typename Method_, typename Time_, typename... Args> | |
| GaussianParams< typename Prior::SpaceType, typename Prior::Scalar > | Emrys::predict (Prior const &prior, UnboundFixedStep< Model_, Method_, Time_ > const &step, Args const &... args) |
| template<UncertainInput Prior, typename Model_, typename Method_, typename Time_, typename... Args> | |
| PredictedJoint< typename Prior::SpaceType, typename Prior::Scalar > | Emrys::predictJoint (Prior const &prior, UnboundFixedStep< Model_, Method_, Time_ > const &step, Args const &... args) |
Variables | |
| template<typename Model> | |
| constexpr bool | Emrys::isFixedStep = false |
| Whether Model is a FixedStepModel, whose predictions take no time step. | |
| template<typename Space_, typename Model_, typename Method_, typename Scalar_> | |
| constexpr bool | Emrys::isFixedStep< FixedStepModel< Space_, Model_, Method_, Scalar_ > > {true} |
| A FixedStepModel is one. | |
| template<typename Model> | |
| constexpr bool | Emrys::isUnboundStep = false |
| Whether Model is a fixed step not yet bound to a state space: an UnboundFixedStep, which fixedStep() returns and a filter binds to its state's space. | |
| template<typename Model_, typename Method_, typename Time_> | |
| constexpr bool | Emrys::isUnboundStep< UnboundFixedStep< Model_, Method_, Time_ > > {true} |
| An UnboundFixedStep is one. | |
Process models as functions with reads and writes (decisions.md [model-policies], [continuous-time-noise], [prediction-inputs], [time-steps]): the ProcessFunction that processModel() builds from a function and its policies; the built-in models RandomWalk, the Kinematic chains ConstantVelocity and ConstantAcceleration, OrnsteinUhlenbeck, and Constant, each the same object; compose(), which puts process models side by side; the ProcessModel concept; predict(), which moves a Gaussian through one by any transform method with the discretized process noise added, and predictJoint(), which also keeps the Gaussian it started from and its cross-covariance with the prediction, a PredictedJoint, which is what a smoother records [smoothing]; propagate(), the noise-free step; and FixedStepModel, a model over one step with the work that depends only on the step done once.
How a prediction reads a model is internal::ResolvedProcess, built on ResolvedReads.h. Read Measurement.h next.
|
nodiscard |