|
EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
|
What a step of time may be (decisions.md [time-steps]). More...
Concepts | |
| concept | Emrys::TimeStep |
A step of time that converts to Scalar: Scalar itself, or any type with a TimeTraits, such as a floating-point number or a std::chrono::duration. | |
Classes | |
| struct | Emrys::TimeTraits< Time > |
How a time type converts to a scalar, as a static member template toScalar<Scalar>(t) returning Scalar, in the unit of the parameters of the models it steps. More... | |
| struct | Emrys::TimeTraits< Time > |
| A floating-point number, taken as it is and converted to the scalar. More... | |
| struct | Emrys::TimeTraits< std::chrono::duration< Rep, Period > > |
A std::chrono::duration, converted to seconds in the scalar by its period. More... | |
| struct | Emrys::Steps |
| A count of a fixed-step model's steps, for predict(Steps{n}). More... | |
What a step of time may be (decisions.md [time-steps]).
A filter's predict(dt), the free predict(), a FixedStepModel, and a ContinuousTimeMarkovChain take their step as any TimeStep and convert it once, at that boundary, to their own Scalar; everything below, a process model's blocks included, takes a Scalar, so a float filter does its time arithmetic in float:
Scalar(dt). The scalar itself, such as an autodiff or multiprecision type, passes through unchanged.std::chrono::duration converts to seconds as its count times its period, computed in the scalar: Scalar(count) divided by the period's denominator, or times its numerator. An integer clock is a duration with its own period, such as std::chrono::duration<std::int64_t, std::ratio<1, 90000>>, and converts the same way.The library does no arithmetic that needs a unit of time: a block combines the step with its own continuous-time parameters, such as a spectral density, a time constant, or a chain's rates, so the step must be in the unit those are in, whatever it is. A duration is the one case where the library converts, and it converts to seconds, the unit std::chrono states every period in: a model stepped by durations has its parameters per second. Passing a duration to a model whose parameters are per hour gives wrong results the library cannot see.