Skip to content

Commit 8235951

Browse files
committed
doc correction UKF
1 parent a2b79c6 commit 8235951

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/estimator/kalman.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,10 @@ Both [`LinModel`](@ref) and [`NonLinModel`](@ref) are supported. The unscented K
371371
is based on the process model :
372372
```math
373373
\begin{aligned}
374-
\mathbf{x}(k+1) &= \mathbf{f̂}\Big(\mathbf{}(k), \mathbf{u}(k), \mathbf{d}(k)\Big)
374+
\mathbf{x}(k+1) &= \mathbf{f̂}\Big(\mathbf{x}(k), \mathbf{u}(k), \mathbf{d}(k)\Big)
375375
+ \mathbf{w}(k) \\
376-
\mathbf{y^m}(k) &= \mathbf{ĥ^m}\Big(\mathbf{}(k), \mathbf{d}(k)\Big) + \mathbf{v}(k) \\
377-
\mathbf{y^u}(k) &= \mathbf{ĥ^u}\Big(\mathbf{}(k), \mathbf{d}(k)\Big) \\
376+
\mathbf{y^m}(k) &= \mathbf{ĥ^m}\Big(\mathbf{x}(k), \mathbf{d}(k)\Big) + \mathbf{v}(k) \\
377+
\mathbf{y^u}(k) &= \mathbf{ĥ^u}\Big(\mathbf{x}(k), \mathbf{d}(k)\Big) \\
378378
\end{aligned}
379379
```
380380
See [`SteadyKalmanFilter`](@ref) for details on ``\mathbf{v}(k), \mathbf{w}(k)`` noises and

src/sim_model.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,8 @@ function LinModel(
161161
C = sys_dis.C;
162162
Dd = sys_dis.D[:,nu+1:end]
163163
# the `let` block captures and fixes A, Bu, Bd, C, Dd values (faster computations):
164-
f = let A=A, Bu=Bu, Bd=Bd
165-
(x,u,d) -> A*x + Bu*u + Bd*d
166-
end
167-
h = let C=C, Dd=Dd
168-
(x,d) -> C*x + Dd*d
169-
end
164+
f = (x,u,d) -> A*x + Bu*u + Bd*d
165+
h = (x,d) -> C*x + Dd*d
170166
return LinModel_ssfunc(A, Bu, C, Bd, Dd, f, h, Ts, nu, nx, ny, nd)
171167
end
172168

0 commit comments

Comments
 (0)