Eurobot2012_Primary

Dependencies:   mbed Eurobot_2012_Primary

Revision:
1:bbabbd997d21
Parent:
0:f3bf6c7e2283
Child:
2:cffa347bb943
--- a/globals.h	Fri Apr 20 20:39:35 2012 +0000
+++ b/globals.h	Fri Apr 20 21:56:15 2012 +0000
@@ -6,15 +6,25 @@
 #define PI 3.14159265
 
 //Robot constants
-//const int encoderRevCount = 1856;
-//const int wheelmm = 314;
-//const int robotCircumference = 1256;
+const int robot_width = 395;
+const int encoderRevCount = 1856;
+const int wheelmm = 314;
+const int robotCircumference = 1256;
 
 //Robot constants in mm
-const int robot_width = 260;
-const int encoderRevCount = 360;
-const int wheelmm = 226;
-const int robotCircumference = 816;
+//const int robot_width = 260;
+//const int encoderRevCount = 360;
+//const int wheelmm = 226;
+//const int robotCircumference = 816;
+
+//Robot movement constants
+const float fwdvarperunit = 0.005; //1 std dev = 7% //NEEDS TO BE MEASURED AGAIN!
+const float varperang = 3E-5; //around 1 degree stddev per 180 turn
+const float xyvarpertime = 0.001; //(very poorly) accounts for hitting things
+const float angvarpertime = 0.001;
+
+//sonar constants
+static const float sonarvariance = 0.005;
 
 //Arena constants
 struct pos {
@@ -23,8 +33,8 @@
 };
 const pos beaconpos[] = {{3000, 1000},{0,0}, {0,2000}};
 
-//sonar constants
-static const float sonarvariance = 0.004;
+//System constants
+const int PREDICTPERIOD = 20; //ms
 
 //High speed serial port
 extern Serial pc;
@@ -38,13 +48,12 @@
 #define RELI_BOUND_LOW          4
 #define RELI_BOUND_HIGH         25
 
-// Localization estimate torrelences
-#define POSITION_TOR            80
+// Localization estimate tolerences
+#define POSITION_TOR            50
 #define ANGLE_TOR               0.15
 
 // motion control
-#define ROTA_SPEED              40
-#define MOVE_SPEED              50
+#define MOVE_SPEED              30
 #define MAX_STEP_RATIO          0.10 //maximum change in the speed
 //#define TRACK_RATE              10       // +- rate for each wheel when tracking
 
@@ -52,6 +61,4 @@
 #define IR_TURRET_PERIOD        200
 #define MOTION_UPDATE_PERIOD    20
 
-
-
 #endif
\ No newline at end of file