Documentation ¶
Index ¶
- type EKF
- func (k *EKF) Cov() mat.Symmetric
- func (k *EKF) Gain() mat.Matrix
- func (k *EKF) Model() filter.DiscreteModel
- func (k *EKF) OutputNoise() filter.Noise
- func (k *EKF) Predict(x, u mat.Vector) (filter.Estimate, error)
- func (k *EKF) Run(x, u, z mat.Vector) (filter.Estimate, error)
- func (k *EKF) SetCov(cov mat.Symmetric) error
- func (k *EKF) StateNoise() filter.Noise
- func (k *EKF) Update(x, u, z mat.Vector) (filter.Estimate, error)
- type IEKF
- type JacFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EKF ¶
type EKF struct { // FJacFn is propagation Jacobian function FJacFn JacFunc // HJacFn is observation Jacobian function HJacFn JacFunc // contains filtered or unexported fields }
EKF is Extended Kalman Filter
func New ¶
New creates new EKF and returns it. It accepts the following parameters: - m: dynamical system model - init: initial condition of the filter - q: state a.k.a. process noise - r: output a.k.a. measurement noise 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 (*EKF) 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 (*EKF) Run ¶
Run runs one step of EKF 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.
type IEKF ¶
type IEKF struct { // ekf.EKF is extended Kalman filter *EKF // contains filtered or unexported fields }
IEKF is Iterated Extended Kalman Filter
func NewIter ¶
NewIter creates new Iterated EKF and returns it. It accepts the following parameters: - m: dynamical system model - ic: initial condition of the filter - q: state a.k.a. process noise - r: output a.k.a. measurement noise - n: number of update iterations 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 - invalid number of update iterations is given: n must be non-negative
func (*IEKF) Run ¶
Run runs one step of IEKF 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.