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 18 06:00:43 2016 +0000
Revision:
2:761e3c932ce0
Child:
5:099cb2e76c7d
guess this is the initial commit :P

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 2:761e3c932ce0 4 #include "generalFunctions.h"
akashvibhute 2:761e3c932ce0 5 #include "mbed.h"
akashvibhute 2:761e3c932ce0 6
akashvibhute 2:761e3c932ce0 7 class localization
akashvibhute 2:761e3c932ce0 8 {
akashvibhute 2:761e3c932ce0 9 public:
akashvibhute 2:761e3c932ce0 10 localization(float wheel_dia, float track_width);
akashvibhute 2:761e3c932ce0 11 void getPosition(float *position_out[2], float heading, float revolutions[2]); //[x,y] position, heading in rad
akashvibhute 2:761e3c932ce0 12 void setPosition(float position_in[2]); //[x,y] position
akashvibhute 2:761e3c932ce0 13
akashvibhute 2:761e3c932ce0 14 private:
akashvibhute 2:761e3c932ce0 15 float position[2];
akashvibhute 2:761e3c932ce0 16 float prevRevolutions[2]; //store previous iteration's revolutions
akashvibhute 2:761e3c932ce0 17 float wheelDia;
akashvibhute 2:761e3c932ce0 18 float trackWidth;
akashvibhute 2:761e3c932ce0 19 float incrementalDistance;
akashvibhute 2:761e3c932ce0 20 };
akashvibhute 2:761e3c932ce0 21
akashvibhute 2:761e3c932ce0 22
akashvibhute 2:761e3c932ce0 23 #endif