• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

IMU.h

Go to the documentation of this file.
00001 // -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-
00002 
00006 
00007 #ifndef IMU_h
00008 #define IMU_h
00009 
00010 #include <AP_Math.h>
00011 #include <inttypes.h>
00012 
00013 class IMU
00014 {
00015 
00016 public:
00018         IMU() {}
00019         
00020         enum Start_style {
00021                 COLD_START = 0,
00022                 WARM_START
00023         };
00024 
00038         virtual void    init(Start_style style) = 0;
00039         
00047         virtual void    init_accel(Start_style style) = 0;
00048 
00056         virtual void    init_gyro(Start_style style) = 0;
00057 
00063         virtual bool    update(void) = 0;
00064 
00069         Vector3f                get_gyro(void) { return _gyro; }
00070 
00075         Vector3f                get_accel(void) { return _accel; }
00076 
00082         uint8_t         adc_constraints;
00083 
00084         // XXX backwards compat hacks
00085         void            load_gyro_eeprom(void)  { init_accel(WARM_START); }     
00086         void            load_accel_eeprom(void) { init_gyro(WARM_START); }      
00087 
00088 protected:
00090         Vector3f                _accel;
00091 
00093         Vector3f                _gyro;
00094 };
00095 
00096 #endif

Generated for ArduPilot Libraries by doxygen