Kalman filter for Eurobot

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Kalman.h Source File

Kalman.h

00001 #include "Matrix.h"
00002 #include "RFSRF05.h"
00003 
00004 //const int wheelmm = 314;
00005 //const int robotCircumference = 1052;
00006 //TODO make a globals and defines header file
00007 const int wheelbase = 400;
00008 
00009 class Kalman {
00010 public:
00011     Kalman();
00012 
00013     void predict(float left, float right);
00014     void update(int sonarid, float dist);
00015     
00016     //State variables
00017     Matrix X; //(3,1)
00018     Matrix P; //(3,3);
00019     
00020 private:
00021     Matrix Q; //perhaps calculate on the fly? dependant on speed etc?
00022     float R;
00023     
00024     RFSRF05 sonararray;//(p13,p21,p22,p23,p24,p25,p26,p5,p6,p7,p8,p9);
00025     static const float beaconx = 0;
00026     static const float beacony = 0;
00027 };