Oskar Weigl / Mbed 2 deprecated Eurobot2013

Dependencies:   mbed mbed-rtos

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers globals.h Source File

globals.h

00001 #ifndef GLOBALS_H
00002 #define GLOBALS_H
00003 
00004 
00005 #define ROBOT_PRIMARY
00006 
00007 
00008 #include "mbed.h"
00009 #define PI 3.14159265
00010 
00011 //enables ui
00012 //#define UION
00013 
00014 
00015 
00016 #ifdef ROBOT_PRIMARY
00017 // Primary defs go here
00018 #else
00019 // Secondary defs go here
00020 #endif
00021 
00022 //Robot hardware parameters
00023 const int robotCircumference = 816; //mm (DUMMY!)
00024 
00025 //Robot movement constants
00026 const float fwdvarperunit = 0.01; //1 std dev = 7% //NEEDS TO BE MEASURED AGAIN!
00027 const float varperang = 0.01; //around 1 degree stddev per 180 turn
00028 const float xyvarpertime = 0.0005; //(very poorly) accounts for hitting things
00029 const float angvarpertime = 0.001;
00030 
00031 //sonar constants
00032 static const float sonarvariance = 0.005;
00033 
00034 //IR constants
00035 static const float IRvariance = 0.001;
00036 
00037 //Arena constants
00038 struct pos {
00039     int x;
00040     int y;
00041 };
00042 
00043 //beacon positions
00044 extern pos beaconpos[];
00045 
00046 //Colour
00047 extern bool Colour; // 1 for red, 0 for blue
00048 
00049 //System constants
00050 const int PREDICTPERIOD = 20; //ms
00051 
00052 //High speed serial port
00053 extern Serial pc;
00054 
00055 
00056 #endif