-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add Joseph form of covariance calculation to Kalman Updater #1028
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1028 +/- ##
==========================================
+ Coverage 93.58% 93.59% +0.01%
==========================================
Files 203 203
Lines 13115 13123 +8
Branches 2678 2679 +1
==========================================
+ Hits 12274 12283 +9
- Misses 591 592 +1
+ Partials 250 248 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
stonesoup/updater/kalman.py
Outdated
return post_cov.view(CovarianceMatrix), kalman_gain | ||
|
||
else: | ||
kalman_gain = hypothesis.measurement_prediction.cross_covar @ \ | ||
np.linalg.inv(hypothesis.measurement_prediction.covar) | ||
|
||
post_cov = hypothesis.prediction.covar - kalman_gain @ \ | ||
hypothesis.measurement_prediction.covar @ kalman_gain.T | ||
|
||
return post_cov.view(CovarianceMatrix), kalman_gain |
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.
return post_cov.view(CovarianceMatrix), kalman_gain | |
else: | |
kalman_gain = hypothesis.measurement_prediction.cross_covar @ \ | |
np.linalg.inv(hypothesis.measurement_prediction.covar) | |
post_cov = hypothesis.prediction.covar - kalman_gain @ \ | |
hypothesis.measurement_prediction.covar @ kalman_gain.T | |
return post_cov.view(CovarianceMatrix), kalman_gain | |
else: | |
kalman_gain = hypothesis.measurement_prediction.cross_covar @ \ | |
np.linalg.inv(hypothesis.measurement_prediction.covar) | |
post_cov = hypothesis.prediction.covar - kalman_gain @ \ | |
hypothesis.measurement_prediction.covar @ kalman_gain.T | |
return post_cov.view(CovarianceMatrix), kalman_gain |
Add the implementation of Joseph form of covariance to the Kalman Updater (as implemented in the Bayesian Recursive Updater).
Fix error arising when using Joseph form of covariance in BRUF with no measurement model.
Add tests.