struct mola::PriorInnovationRates¶
Overview¶
Per-axis running mean of the squared innovation rates (nu_i / dt)^2.
#include <PriorInnovation.h> struct PriorInnovationRates { // fields static constexpr double MAX_RATIO = 25.0; static constexpr double MIN_VAR_RATE = 1e-6; std::array<double, 6> var_rate {}; uint32_t count = 0; std::vector<std::array<double, 6>> warmup; // methods void add( const Eigen::Matrix<double, 6, 1>& innovation, double dt, double timeConstant, uint32_t minSamples ); bool ready(uint32_t minSamples) const; };
Fields¶
static constexpr double MAX_RATIO = 25.0
Rate of a sample, relative to the current mean, above which it is clipped.
static constexpr double MIN_VAR_RATE = 1e-6
Lower bound of the mean in that clipping threshold.
std::array<double, 6> var_rate {}
[m^2/s^2] x3, then [rad^2/s^2] x3
uint32_t count = 0
Samples added.
std::vector<std::array<double, 6>> warmup
Samples kept until the mean is seeded.
Methods¶
void add( const Eigen::Matrix<double, 6, 1>& innovation, double dt, double timeConstant, uint32_t minSamples )
Adds the innovation of one registration, dt seconds after the previous one (ignored if dt <= 1 ms). The first minSamples only collect: their per-axis median seeds the mean, so a start-up transient cannot set it. Later samples update an exponential mean with time constant timeConstant [s], each clipped at MAX_RATIO times the current mean.
bool ready(uint32_t minSamples) const
Whether the warm-up is over and var_rate holds a mean.