General IMU Library

Dependencies:   mbed LSM9DS1_Library

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IMU.h Source File

IMU.h

Go to the documentation of this file.
00001 /**
00002 *   @file   IMU.h
00003 *
00004 *   @brief  Class for reading the accelerometer
00005 *
00006 *   @author Terrabots Team
00007 *
00008 */
00009 
00010 #ifndef IMU_H
00011 #define IMU_H
00012 
00013 #include "mbed.h"
00014 #include "LSM9DS1.h"
00015 
00016 class IMU {
00017     public:
00018         /**
00019         *   Constructor for the IMU
00020         */
00021         IMU();
00022         /**
00023         *   Track the angle of the truck bed
00024         */
00025         void trackBed();
00026         /**
00027         *   Track the angle of the truck as it moves
00028         */
00029         void trackHeading();
00030 
00031     private:
00032         LSM9DS1 *I;
00033         bool state;
00034         float ax01;
00035         float ay01;
00036         float az01;
00037         float ax0;
00038         float ay0;
00039         float az0;
00040         float ax;
00041         float ay;
00042         float az;
00043         float theta;
00044 };
00045 
00046 #endif