Mercurial > hg > beaglert
diff include/Kalman.h @ 149:134bff10e561 ClockSync
Added simple one-variable one-measurement Kalman filter, Pid controller(which output is not used). Virtual clock is now much more precise and reactive for period. Still it is lagging behind a bit on the overall offset.
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Mon, 21 Sep 2015 03:12:21 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/Kalman.h Mon Sep 21 03:12:21 2015 +0100 @@ -0,0 +1,25 @@ +/* + * Kalman.h + * + * Created on: 20 Sep 2015 + * Author: giulio + */ + +#ifndef KALMAN_H_ +#define KALMAN_H_ + +class KalmanOne{ +public: + double A; + double H; + double Q; + double R; + double x; + double P; + void init(double newQ, double newR, double newX); + double process(double z); +}; + + + +#endif /* KALMAN_H_ */