-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update jacToGlobal after KF filtering #935
Conversation
Codecov Report
@@ Coverage Diff @@
## main #935 +/- ##
=======================================
Coverage 48.75% 48.75%
=======================================
Files 331 331
Lines 17101 17103 +2
Branches 8070 8070
=======================================
+ Hits 8337 8339 +2
Misses 3057 3057
Partials 5707 5707
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solves the problem pretty well. I just have two rather general comments:
-
I built the covariance transport such that you calculate the 'jacToGlobal' as soon as the transport is performed. The intention was to always have the 'jacToGlobal' present and nobody has to care about this. However, as you figured (correctly) out that this is not correct if the parameters change, we might want to disable this transport.
-
The parameters you hand over to the 'update()' are a bit duplicated. Would it make a difference if you would a) just pass the bound parameters and the surface but no free parameters or b) pass the free parameters and the jacobian?
I'm fine with the PR as it is but 1) should be considered as a follow-up and 2) is just up to your choice. I will approve this in case you want to follow 1) up in a separate PR and keep the current interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine & should go in.
Thank you for your suggestions. |
The 'jacToGlobal' is calculated twice in case of an 'update()' call. The first time when you transport the covariance matrix to the current surface and then a second time after the update. The first calculation is not necessary if you know that you will update the parameters, so you could add e.g. a flag that disables the 'jacToGlobal' calculation when transporting the covariance matrix.
This is just a style-related comment. If that appears more often then a refactoring might be necessary, indeed. |
Thank you for the clarification. That's a good point. I will open another PR for this. |
Revert temporary change.
We had another (C)KF related PR going in, so I will update this branch first - but merge when gone through. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approving.
Currently, the stepper only update the
cov
andpars
in theupdate
invocation. However, the updatedpars
means thejacToGlobal
should be updated as well, in particular thepars
has underwent some big change after the KF filtering.So this PR fixes the issue. It adds the update of the
jacToGlobal
in the stepperupdate
method.