implementatio of a linear kalman filter