Linear Kalman filter in C