Skip to content

Commit 6522a50

Browse files
committed
clean up code
1 parent e9ec616 commit 6522a50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/estimator/execute.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ function f̂!(x̂next, estim::StateEstimator, model::SimModel, x̂, u, d)
3333
# `@views` macro avoid copies with matrix slice operator e.g. [a:b]
3434
@views x̂d, x̂s = x̂[1:model.nx], x̂[model.nx+1:end]
3535
@views x̂d_next, x̂s_next = x̂next[1:model.nx], x̂next[model.nx+1:end]
36-
T = promote_type(eltype(x̂), eltype(u))
37-
u_us = Vector{T}(undef, model.nu) # TODO: avoid this allocation if possible
38-
u_us .= u .+ mul!(u_us, estim.Cs_u, x̂s)
39-
f!(x̂d_next, model, x̂d, u_us, d)
36+
T = promote_type(eltype(x̂), eltype(u))
37+
= Vector{T}(undef, model.nu) # TODO: avoid this allocation if possible
38+
.= u .+ mul!(, estim.Cs_u, x̂s)
39+
f!(x̂d_next, model, x̂d, , d)
4040
mul!(x̂s_next, estim.As, x̂s)
4141
return nothing
4242
end

0 commit comments

Comments
 (0)