|
864 | 864 | @test mhe3.nx̂ == 5 |
865 | 865 |
|
866 | 866 | mhe4 = MovingHorizonEstimator(nonlinmodel, He=5, σQ=[1,2,3,4], σQint_ym=[5, 6], σR=[7, 8]) |
867 | | - @test mhe4.Q̂ ≈ Hermitian(diagm(Float64[1, 4, 9 ,16, 25, 36])) |
868 | | - @test mhe4.R̂ ≈ Hermitian(diagm(Float64[49, 64])) |
| 867 | + @test mhe4.cov.Q̂ ≈ Hermitian(diagm(Float64[1, 4, 9 ,16, 25, 36])) |
| 868 | + @test mhe4.cov.R̂ ≈ Hermitian(diagm(Float64[49, 64])) |
869 | 869 |
|
870 | 870 | mhe5 = MovingHorizonEstimator(nonlinmodel, He=5, nint_ym=[2,2]) |
871 | 871 | @test mhe5.nxs == 4 |
@@ -1116,7 +1116,7 @@ end |
1116 | 1116 | ) |
1117 | 1117 | mhe.P̂arr_old[1, 1] = Inf # Inf to trigger fallback |
1118 | 1118 | P̂arr_old_copy = deepcopy(mhe.P̂arr_old) |
1119 | | - invP̄_copy = deepcopy(mhe.invP̄) |
| 1119 | + invP̄_copy = deepcopy(mhe.cov.invP̄) |
1120 | 1120 | @test_logs( |
1121 | 1121 | (:error, "Arrival covariance P̄ is not finite: keeping the old one"), |
1122 | 1122 | preparestate!(mhe, [50, 30], [5]) |
@@ -1425,7 +1425,7 @@ end |
1425 | 1425 | # recuperate P̂(-1|-1) exact value using the Unscented Kalman filter: |
1426 | 1426 | preparestate!(ukf, [50, 30], [20]) |
1427 | 1427 | preparestate!(ekf, [50, 30], [20]) |
1428 | | - σP̂ = sqrt.(diag(ukf.P̂)) |
| 1428 | + σP̂ = sqrt.(diag(ukf.cov.P̂)) |
1429 | 1429 | mhe = MovingHorizonEstimator(nonlinmodel, He=5, nint_ym=0, direct=true, σP_0=σP̂) |
1430 | 1430 | updatestate!(ukf, [10, 50], [50, 30], [20]) |
1431 | 1431 | updatestate!(ekf, [10, 50], [50, 30], [20]) |
|
0 commit comments