Skip to content

Commit

Permalink
Merge pull request #137 from JuliaControl/preparestate_correction
Browse files Browse the repository at this point in the history
changed: `preparestate!` default `d` argument as empty vector
  • Loading branch information
franckgaga authored Dec 12, 2024
2 parents b5bc3f7 + 11b701e commit 0c1cc82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/estimator/execute.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ end
(estim::StateEstimator)(d=estim.buffer.empty) = evaloutput(estim, d)

@doc raw"""
preparestate!(estim::StateEstimator, ym, d=estim.model.dop) -> x̂
preparestate!(estim::StateEstimator, ym, d=[]) -> x̂
Prepare `estim.x̂0` estimate with meas. outputs `ym` and dist. `d` for the current time step.
Expand Down Expand Up @@ -231,7 +231,7 @@ julia> x̂ = preparestate!(estim1, [1])
0.0
```
"""
function preparestate!(estim::StateEstimator, ym, d=estim.model.dop)
function preparestate!(estim::StateEstimator, ym, d=estim.buffer.empty)
if estim.direct
validate_args(estim, ym, d)
y0m, d0 = remove_op!(estim, ym, d)
Expand Down
4 changes: 2 additions & 2 deletions src/model/nonlinmodel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ defined as ``d(t) = t``. The functions can be implemented in two possible ways:
`Ts` is the sampling time in second. `nu`, `nx`, `ny` and `nd` are the respective number of
manipulated inputs, states, outputs and measured disturbances. The keyword argument `p`
is the parameters of the model passed to the two functions. It can be of any Julia object
but use a mutable type if you want to change them later e.g.: a vector.
is the parameters of the model passed to the two functions. It can be any Julia objects but
use a mutable type if you want to change them later e.g.: a vector.
!!! tip
Replace the `d` or `p` argument with `_` in your functions if not needed (see Examples below).
Expand Down

0 comments on commit 0c1cc82

Please sign in to comment.