Skip to content

Commit 0c1cc82

Browse files
authored
Merge pull request #137 from JuliaControl/preparestate_correction
changed: `preparestate!` default `d` argument as empty vector
2 parents b5bc3f7 + 11b701e commit 0c1cc82

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/estimator/execute.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ end
203203
(estim::StateEstimator)(d=estim.buffer.empty) = evaloutput(estim, d)
204204

205205
@doc raw"""
206-
preparestate!(estim::StateEstimator, ym, d=estim.model.dop) -> x̂
206+
preparestate!(estim::StateEstimator, ym, d=[]) -> x̂
207207
208208
Prepare `estim.x̂0` estimate with meas. outputs `ym` and dist. `d` for the current time step.
209209
@@ -231,7 +231,7 @@ julia> x̂ = preparestate!(estim1, [1])
231231
0.0
232232
```
233233
"""
234-
function preparestate!(estim::StateEstimator, ym, d=estim.model.dop)
234+
function preparestate!(estim::StateEstimator, ym, d=estim.buffer.empty)
235235
if estim.direct
236236
validate_args(estim, ym, d)
237237
y0m, d0 = remove_op!(estim, ym, d)

src/model/nonlinmodel.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ defined as ``d(t) = t``. The functions can be implemented in two possible ways:
8080
8181
`Ts` is the sampling time in second. `nu`, `nx`, `ny` and `nd` are the respective number of
8282
manipulated inputs, states, outputs and measured disturbances. The keyword argument `p`
83-
is the parameters of the model passed to the two functions. It can be of any Julia object
84-
but use a mutable type if you want to change them later e.g.: a vector.
83+
is the parameters of the model passed to the two functions. It can be any Julia objects but
84+
use a mutable type if you want to change them later e.g.: a vector.
8585
8686
!!! tip
8787
Replace the `d` or `p` argument with `_` in your functions if not needed (see Examples below).

0 commit comments

Comments
 (0)