Try It: Kalman Gain Calculator
Try It: Kalman Gain Calculator
Technical boundaries. The scalar update assumes P and R are variance inputs with compatible units. Presets override slider values, including R = 1000 beyond the custom slider maximum; no measured state or repeated prediction cycle is calculated.
Try It: Kalman Gain Calculator
Move the controls to see how prediction variance P and sensor variance R set the gain K. A larger gain gives the new reading more weight.
Suppose two designs have the errors below. The ratio shows how much smaller one error is. These values are assumptions, not test results.
For an illustrative indoor case, suppose the error falls from 6.5 m to 2.0 m. The ratio is:
Here is prediction error variance and is measurement error variance. Both use squared metres in this position example. The scalar gain is:
If IMU prediction uncertainty is and GPS measurement noise is (a one-standard-deviation error of 3 m, variance = ), then — the update shifts only 10% toward GPS, trusting the IMU prediction 90%. When GPS is missing, skip its update and propagate the state and uncertainty until a valid fix returns. Conversely, if IMU has drifted significantly () and GPS is strong (), — trust GPS 92%. This weighting can help when the model and noise estimates remain valid; faults and biased readings can still cause failure.