The Kalman filter algorithm can be applied as a recursive estimator of the state of a dynamic system described by a linear difference equation. Given discrete measurements linearly related to the state of the system, but corrupted by white Gaussian noise, the Kalman filter estimate of the system is statistically optimal with respect to a quadratic function of the estimate error. The first objective of this paper is to give deep enough insight into the mathematics of the Kalman filter algorithm to be able to choose the correct type of algorithm and to set all the parameters correctly in a basic application. This description also includes several examples of different approaches to derive and to explain the Kalman filter algorithm. In additio...