Mercurial > hg > beaglert
comparison 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 |
comparison
equal
deleted
inserted
replaced
148:6cd38e261027 | 149:134bff10e561 |
---|---|
1 /* | |
2 * Kalman.h | |
3 * | |
4 * Created on: 20 Sep 2015 | |
5 * Author: giulio | |
6 */ | |
7 | |
8 #ifndef KALMAN_H_ | |
9 #define KALMAN_H_ | |
10 | |
11 class KalmanOne{ | |
12 public: | |
13 double A; | |
14 double H; | |
15 double Q; | |
16 double R; | |
17 double x; | |
18 double P; | |
19 void init(double newQ, double newR, double newX); | |
20 double process(double z); | |
21 }; | |
22 | |
23 | |
24 | |
25 #endif /* KALMAN_H_ */ |