Kalman filter for Eurobot

Kalman.h

Committer:
madcowswe
Date:
2012-03-20
Revision:
0:a0285293f6a6

File content as of revision 0:a0285293f6a6:

#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;
};