A Kalman Filter is a filtering algorithm that tries to estimate values based on measurements and pre-determined models. This can be applied in VEX Robotics to reduce noise in different sensor measurements, such as a noisy ultrasonic rangefinder measurement or a noisy trend in an average value obtained from multiple sensors.
Initialize the state of the filter
Initialize our belief in the state
Use process model to predict state at the next time step
Adjust belief to account for the uncertainty in prediction
Get a measurement and associated belief about its accuracy
Compute residual between estimated state and measurement
Compute scaling factor based on whether the measurement or prediction is more accurate.
Set state between the prediction and measurement based on the scaling factor.
Update belief in the state based on how certain we are in the measurement prediction.
BLRS (Purdue SIGBots)