Skip to content

Commit dea3c39

Browse files
committed
test: debug
1 parent 8f45221 commit dea3c39

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/estimator/construct.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,7 @@ function KalmanCovariances(
105105
) where {NT<:Real}
106106
validate_kfcov(model, i_ym, nint_u, nint_ym, Q̂, R̂, P̂_0)
107107
Q̂, R̂ = NT.(Q̂), NT.(R̂)
108-
if !isnothing(P̂_0)
109-
P̂_0 .= NT.(P̂_0)
110-
end
111-
println(Q̂)
112-
println(R̂)
113-
println(P̂_0)
108+
!isnothing(P̂_0) && (P̂_0 = NT.(P̂_0))
114109
return KalmanCovariances{NT}(Q̂, R̂, P̂_0, He)
115110
end
116111

test/2_test_state_estim.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ end
11281128
updatestate!(mhe, [10, 50], [50, 30], [5])
11291129
)
11301130
@test mhe.P̂arr_old P̂arr_old_copy
1131-
@test mhe.invP̄ invP̄_copy
1131+
@test mhe.cov.invP̄ invP̄_copy
11321132
end
11331133

11341134
@testitem "MovingHorizonEstimator set constraints" setup=[SetupMPCtests] begin
@@ -1354,8 +1354,8 @@ end
13541354
nonlinmodel = NonLinModel(f, h, 10.0, 1, 1, 1, p=linmodel, solver=nothing)
13551355
mhe2 = MovingHorizonEstimator(nonlinmodel; He, nint_ym=0)
13561356
setmodel!(mhe2, Q̂=[1e-3], R̂=[1e-6])
1357-
@test mhe2. [1e-3]
1358-
@test mhe2. [1e-6]
1357+
@test mhe2.cov. [1e-3]
1358+
@test mhe2.cov. [1e-6]
13591359
@test_throws ErrorException setmodel!(mhe2, deepcopy(nonlinmodel))
13601360
end
13611361

0 commit comments

Comments
 (0)