a simple kalman filter implementation in c