A non-mathematical introduction to Kalman filters for programmers
https://praveshkoirala.com/2023/06/13/a-non-mathematical-introduction-to-kalman-filters-for-programmers/
- Kalman filters combine multiple noisy measurements to produce a more accurate estimate.
- They are useful because real-life measurements are often imperfect and unreliable due to factors like sensor noise and malfunction.
- An example is estimating the location of a ship using both its velocity and GPS sensor measurements. Both are imperfect so a Kalman filter can combine them.
- The Kalman filter takes a weighted average of the measurements, with more weight given to the more reliable source based on its variance.
- The code simulates 1000 passengers on a ship estimating its location using noisy velocity and sensor measurements.
- The Kalman filter calculates the variance of the measurements to determine the trustworthiness of each source.
- It then takes a weighted average based on the trust values to produce a combined position estimate.
- The results show the combined estimate is better than either measurement alone, especially when one source has a glitch.
- The Kalman filter automatically adjusts for variations and provides a reasonably reliable estimate.