Closed cboulay closed 8 years ago
Thanks for pointing this out! Will be fixed in a future release (might take a little, I am working on a new API, but the current one will still be around for a while)
I was more pointing it out as a probe to make sure I understood what was going on. I'm happy I was correct, I think. And thanks for the great library; I'm finding it easy to read and learn from.
As github issues aren't the best places for these questions, may I send you an e-mail to ask a question about your SRUKF implementation?
The questions:
f
and h
directly. Thus, the noise is not used directly in the calculation of S
I haven't implemented the latter so I don't know if the results are significantly different or if one is more robust or efficient than the other. I'm especially concerned about this if it turns out our observation noise has to be updated on every step.
observation_model.setCovariance(new_covariance)
. Should new_covariance
be the full covariance or as square-root?I just pushed two commits with a fix for the initial issue regarding the wrong docstring and an addition for setting/updating the covariance.
Please feel free to send me an email with questions, but consider opening issues here on github as these questions might be relevant to other people as well.
Regarding your two questions:
did you happen to see the algorithm in this paper from the same authors in Appendix A.C?
No. I also didn't really have the time to look through it in detail.
Have you used your library in an application where (observation) noise was dynamic?
As you already figured, you can make your process and/or state noise dynamic/time-dependent by updating your state/measurement model. As shown in the examples, you should derive your measurement model from Kalman::MeasurementModel
and make sure that the CovarianceBase
template parameter is set to Kalman::SquareRootBase
if you want to use a Square-Root based filter (this avoids unnecessary square root computations).
You may then update the value of your measurement/process noise using either setCovariance
, which expects a full covariance matrix as argument or using setCovarianceSquareRoot
. I added the latter of them in 16d74cb . setCovarianceSquareRoot
expects a lower triangular matrix square root as argument (The strictly upper part of the matrix is irrelevant). This avoids the Cholesky decomposition on each update.
Great, thanks!
here
It looks like that's the comment for MeasurementModel::h, which returns the measurement value, not SystemModel::f, which returns the state.