rlabbe / filterpy

Python Kalman filtering and optimal estimation library. Implements Kalman filter, particle filter, Extended Kalman filter, Unscented Kalman filter, g-h (alpha-beta), least squares, H Infinity, smoothers, and more. Has companion book 'Kalman and Bayesian Filters in Python'.
MIT License
3.22k stars 612 forks source link

Passing Q matrices to UKF's RTS smoother #287

Open mcphatty opened 1 year ago

mcphatty commented 1 year ago

Hi,

I think I spotted a "bug", maybe it is not that important for most of the people.

In UKF's RTS smoothing function there is a parameter for passing Q matrices to the smoother ('Qs'), but the variable seems not to be referenced, instead self.Q is always passed to the unscented transform.

Thank you and kind regards, Philipp

mcphatty commented 1 year ago

Just an addition, for the sake of completeness: It would be nice to be able to pass Q to UKF's predict() function as an override of the internal one, just like in KalmanFilter.