Skip to content

Create wrapper for square-root Kalman filter #97

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

THargreaves
Copy link
Collaborator

This PR adds a wrapper for KalmanFilters.jl's square-root Kalman filter and corresponding unit tests. Solves #5

It's works fine for regular arrays but when static arrays are inputted, the outputs become regular arrays. This is an upstream issue that I'll create a PR for.

Copy link
Member

@charlesknipp charlesknipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; although I'm a bit surprised that KalmanFilters.jl does not support drift terms.

Besides the incomplete unit tests, I only have minor nitpicks.

)
μ, Σ = GaussianDistributions.pair(state)
H, c, R = calc_params(model.obs, iter; kwargs...)
!all(c .== 0) && error("SKRF doesn't current support non-zero c")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!all(c .== 0) && error("SKRF doesn't current support non-zero c")
c != zero) && error("SKRF doesn't current support non-zero c")

I doubt this gets us any speed up, but should guarantee type stability in 99% of cases.

)
μ, Σ = GaussianDistributions.pair(state)
A, b, Q = calc_params(model.dyn, iter; kwargs...)
!all(b .== 0) && error("SKRF doesn't current support non-zero b")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
!all(b .== 0) && error("SKRF doesn't current support non-zero b")
b != zero) && error("SKRF doesn't current support non-zero b")

same as before

Comment on lines +103 to +104
# @test isa(srkf_state.μ, SVector)
# @test isa(srkf_state.Σ.mat, SMatrix)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's up with the unit testing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants