Documentation ¶
Index ¶
- type KF
- func (k *KF) Cov() mat.Symmetric
- func (k *KF) Gain() mat.Matrix
- func (k *KF) Model() filter.Model
- func (k *KF) OutputNoise() filter.Noise
- func (k *KF) Predict(x, u mat.Vector) (filter.Estimate, error)
- func (k *KF) Run(x, u, z mat.Vector) (filter.Estimate, error)
- func (k *KF) SetCov(cov mat.Symmetric) error
- func (k *KF) StateNoise() filter.Noise
- func (k *KF) Update(x, u, ym mat.Vector) (filter.Estimate, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KF ¶
type KF struct {
// contains filtered or unexported fields
}
KF is Kalman Filter
func New ¶
New creates new KF and returns it. It accepts the following parameters:
- m: dynamical system model
- init: initial condition of the filter
- z: disturbance input a.k.a. process noise corresponding to E disturbance matrix
- wn: output noise a.k.a. measurement noise
- c: KF configuration (contains propagation and observation matrices)
It returns error if either of the following conditions is met:
- invalid model is given: model dimensions must be positive integers
- invalid state or output noise is given: noise covariance must either be nil or match the model dimensions
func (*KF) Predict ¶
Predict calculates the next system state given the state x and input u and returns its estimate. It first generates new sigma points around x and then attempts to propagate them to the next step. It returns error if it either fails to generate or propagate the sigma points (and x) to the next step.
func (*KF) Run ¶
Run runs one step of KF for given state x, input u and measurement z. It corrects system state x using measurement z and returns new system estimate. It returns error if it either fails to propagate or correct state x.