peripherals  1.4.2
RoadNarrows Robotics Hardware Peripherals Package
imu.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Package: RoadNarrows Robotics Peripherals
4 //
5 // Library: libimu
6 //
7 // File: imu.h
8 //
9 /*! \file
10  *
11  * $LastChangedDate: 2015-02-25 14:46:44 -0700 (Wed, 25 Feb 2015) $
12  * $Rev: 3872 $
13  *
14  * \brief IMU class interface.
15  *
16  * \author Robin Knight (robin.knight@roadnarrows.com)
17  *
18  * \copyright
19  * \h_copy 2015-2017. RoadNarrows LLC.\n
20  * http://www.roadnarrows.com\n
21  * All Rights Reserved
22  */
23 /*
24  * @EulaBegin@
25  * @EulaEnd@
26  */
27 ////////////////////////////////////////////////////////////////////////////////
28 
29 #ifndef _IMU_H
30 #define _IMU_H
31 
32 #include "rnr/imu/imuConst.h"
33 #include "rnr/imu/imuSensor.h"
34 
35 /*!
36  * \brief RoadNarrows Robotics standard namespace.
37  */
38 namespace rnr
39 {
40  /*!
41  * \ingroup periph_imu_base
42  * \brief IMU class.
43  */
44  class IMU
45  {
46  public:
47  IMU();
48 
49  IMU(IMUSensor &sensor);
50 
51  ~IMU();
52 
53  void getCaps();
54 
55  int readAccelerometer(double &ax, double &ay, double &az);
56 
57  int readGyroscope(double &gx, double &gy, double &gz);
58 
59  int readMagnetometer(double &mx, double &my, double &mz);
60 
61  int readBarometer(double &p);
62 
63  int readTemperature(double &temp);
64 
65  int quaternion();
66 
67  int eulerAngles();
68 
69  int acceleration();
70 
71  int velocity();
72 
73  int position();
74 
75 
76  protected:
77  }
78 
79 } // namespace rnr
80 
81 
82 #endif // _IMU_H
IMU class.
Definition: imu.h:44
IMU sensor base class interface.
IMU sensor class.
Definition: imuSensor.h:43
IMU constants.
RoadNarrows Robotics standard namespace.
Definition: HID.h:65