Add Kalman filter and fix Linux build