sfwa / ukf

Unscented Kalman Filter library for state and parameter estimation
http://au.tono.my/log/20130531-kalman-filter.html
MIT License
461 stars 172 forks source link

Examples? #28

Closed ghost closed 8 years ago

ghost commented 9 years ago

Congrats on this amazing work. Is it possible to provide an example of usage. Say filter the accelerometer readings with or without quaternions. I'm quite new to the Kalman filters and I'm still trying to get my head around how you properly parameterise them.

Thanks. John

danieldyer commented 9 years ago

Hi John,

Thanks – If you have a look at the UKF unit tests here, there are a number of examples of the filter being used with only certain sensors (with synthetic data).

However, the state vector is not necessarily fully observable if you're only using a limited subset of the sensors, so certain parts of it may grow without bound – for example, if you only provide accelerometer readings, heading is unobservable (along with position and velocity) and so you'll get some strange results.

It'd be possible (for example) to modify the filter to be an orientation-only filter without much difficulty, but it would still require accelerometer and magnetometer data at a minimum to allow the full quaternion attitude to be estimated.