2014 Eurobot fork

Dependencies:   mbed-rtos mbed QEI

Files at this revision

API Documentation at this revision

Comitter:
madcowswe
Date:
Mon Apr 15 17:06:46 2013 +0000
Parent:
75:283283604485
Child:
80:b9b5d5ecea71
Commit message:
Tuned kalman variances, needs testing

Changed in this revision

Processes/Kalman/Kalman.cpp Show annotated file Show diff for this revision Revisions of this file
globals.h Show annotated file Show diff for this revision Revisions of this file
--- a/Processes/Kalman/Kalman.cpp	Mon Apr 15 15:29:40 2013 +0000
+++ b/Processes/Kalman/Kalman.cpp	Mon Apr 15 17:06:46 2013 +0000
@@ -140,8 +140,8 @@
 
     P = 0.02*0.02,  0,          0,          0,
         0,          0.02*0.02,  0,          0,
-        0,          0,          0.4*0.4,    -0.4*0.4,
-        0,          0,          -0.4*0.4,   0.4*0.4 + 0.05*0.05;
+        0,          0,          0.1*0.1,    -0.1*0.1,
+        0,          0,          -0.1*0.1,   0.1*0.1 + 0.05*0.05;
         
     statelock.unlock();
 
@@ -386,7 +386,7 @@
                 }
 
                 Matrix<float, 4, 1> PHt (P * trans(H));
-                S = (H * PHt)(0,0) + variance*10; //TODO: Temp Hack!
+                S = (H * PHt)(0,0) + variance*4; //TODO: Temp Hack!
 
                 OLED3 = 0;
                 if (aborton2stddev && Y*Y > 4 * S) {
--- a/globals.h	Mon Apr 15 15:29:40 2013 +0000
+++ b/globals.h	Mon Apr 15 17:06:46 2013 +0000
@@ -16,10 +16,10 @@
 const float TURRET_FWD_PLACEMENT = -0.042;
 
 //Robot movement constants
-const float fwdvarperunit = 0.001; //1 std dev = 7% //TODO: measrue this!!
-const float varperang = 0.0005; //around 3 degree stddev per 180 turn //TODO: measrue this!!
-const float xyvarpertime = 0.0001; //(very poorly) accounts for hitting things
-const float angvarpertime = 0.001;  
+const float fwdvarperunit = 0.0001; //1 std dev = 7% //TODO: measrue this!!
+const float varperang = 0.0003; //around 3 degree stddev per 180 turn //TODO: measrue this!!
+const float xyvarpertime = 0.000025; //(very poorly) accounts for hitting things
+const float angvarpertime = 0.0001;  
 
 const float MOTORCONTROLLER_FILTER_K = 0.5;// TODO: tune this
 const float MOTOR_MAX_POWER = 0.5f;