Implement new controller

Dependencies:   mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo

Fork of Orion_newPCB_test by Team Virgo v3

Committer:
akashvibhute
Date:
Mon Jan 25 07:28:40 2016 +0000
Revision:
5:099cb2e76c7d
Parent:
2:761e3c932ce0
all threads populated

Who changed what in which revision?

UserRevisionLine numberNew contents of line
akashvibhute 2:761e3c932ce0 1 #ifndef localization_H
akashvibhute 2:761e3c932ce0 2 #define localization_H
akashvibhute 2:761e3c932ce0 3
akashvibhute 5:099cb2e76c7d 4 #include "mbed.h"
akashvibhute 2:761e3c932ce0 5 #include "generalFunctions.h"
akashvibhute 5:099cb2e76c7d 6 #include "config.h"
akashvibhute 5:099cb2e76c7d 7
akashvibhute 2:761e3c932ce0 8
akashvibhute 2:761e3c932ce0 9 class localization
akashvibhute 2:761e3c932ce0 10 {
akashvibhute 2:761e3c932ce0 11 public:
akashvibhute 5:099cb2e76c7d 12 localization();
akashvibhute 2:761e3c932ce0 13 void getPosition(float *position_out[2], float heading, float revolutions[2]); //[x,y] position, heading in rad
akashvibhute 2:761e3c932ce0 14 void setPosition(float position_in[2]); //[x,y] position
akashvibhute 2:761e3c932ce0 15
akashvibhute 2:761e3c932ce0 16 private:
akashvibhute 2:761e3c932ce0 17 float position[2];
akashvibhute 2:761e3c932ce0 18 float prevRevolutions[2]; //store previous iteration's revolutions
akashvibhute 2:761e3c932ce0 19 float wheelDia;
akashvibhute 2:761e3c932ce0 20 float trackWidth;
akashvibhute 2:761e3c932ce0 21 float incrementalDistance;
akashvibhute 2:761e3c932ce0 22 };
akashvibhute 2:761e3c932ce0 23
akashvibhute 2:761e3c932ce0 24
akashvibhute 2:761e3c932ce0 25 #endif