Skip to content

Commit

Permalink
debug: make it work on Julia nightly (copy and Hermitians does not …
Browse files Browse the repository at this point in the history
…pair well)
  • Loading branch information
franckgaga committed Sep 12, 2024
1 parent f233474 commit afda349
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/estimator/kalman.jl
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ struct KalmanFilter{NT<:Real, SM<:LinModel} <: StateEstimator{NT}
x̂0 = [zeros(NT, model.nx); zeros(NT, nxs)]
Q̂, R̂ = Hermitian(Q̂, :L), Hermitian(R̂, :L)
P̂_0 = Hermitian(P̂_0, :L)
= copy(P̂_0)
= Hermitian(copy(P̂_0.data), :L) # copy on P̂_0.data necessary for Julia Nightly
= zeros(NT, nx̂, nym)
corrected = [false]
buffer = StateEstimatorBuffer{NT}(nu, nx̂, nym, ny, nd)
Expand Down Expand Up @@ -539,7 +539,7 @@ struct UnscentedKalmanFilter{NT<:Real, SM<:SimModel} <: StateEstimator{NT}
x̂0 = [zeros(NT, model.nx); zeros(NT, nxs)]
Q̂, R̂ = Hermitian(Q̂, :L), Hermitian(R̂, :L)
P̂_0 = Hermitian(P̂_0, :L)
= copy(P̂_0)
= Hermitian(copy(P̂_0.data), :L) # copy on P̂_0.data necessary for Julia Nightly
= zeros(NT, nx̂, nym)
= Hermitian(zeros(NT, nym, nym), :L)
X̂0, X̄0 = zeros(NT, nx̂, nσ), zeros(NT, nx̂, nσ)
Expand Down Expand Up @@ -910,10 +910,9 @@ struct ExtendedKalmanFilter{NT<:Real, SM<:SimModel} <: StateEstimator{NT}
validate_kfcov(nym, nx̂, Q̂, R̂, P̂_0)
lastu0 = zeros(NT, nu)
x̂0 = [zeros(NT, model.nx); zeros(NT, nxs)]
Q̂, R̂ = Hermitian(Q̂, :L), Hermitian(R̂, :L)
P̂_0 = Hermitian(P̂_0, :L)
= Hermitian(Q̂, :L)
= Hermitian(R̂, :L)
= copy(P̂_0)
= Hermitian(copy(P̂_0.data), :L) # copy on P̂_0.data necessary for Julia Nightly
= zeros(NT, nx̂, nym)
F̂_û, F̂ = zeros(NT, nx̂+nu, nx̂), zeros(NT, nx̂, nx̂)
Ĥ, Ĥm = zeros(NT, ny, nx̂), zeros(NT, nym, nx̂)
Expand Down

0 comments on commit afda349

Please sign in to comment.