Kalman filter for Eurobot
Diff: Kalman.h
- Revision:
- 0:a0285293f6a6
diff -r 000000000000 -r a0285293f6a6 Kalman.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Kalman.h Tue Mar 20 12:43:16 2012 +0000 @@ -0,0 +1,27 @@ +#include "Matrix.h" +#include "RFSRF05.h" + +//const int wheelmm = 314; +//const int robotCircumference = 1052; +//TODO make a globals and defines header file +const int wheelbase = 400; + +class Kalman { +public: + Kalman(); + + void predict(float left, float right); + void update(int sonarid, float dist); + + //State variables + Matrix X; //(3,1) + Matrix P; //(3,3); + +private: + Matrix Q; //perhaps calculate on the fly? dependant on speed etc? + float R; + + RFSRF05 sonararray;//(p13,p21,p22,p23,p24,p25,p26,p5,p6,p7,p8,p9); + static const float beaconx = 0; + static const float beacony = 0; +}; \ No newline at end of file