imu.h
Go to the documentation of this file.
1 #ifndef PHIDGETS_API_IMU_H
2 #define PHIDGETS_API_IMU_H
3 
4 #include "phidgets_api/phidget.h"
5 
6 namespace phidgets {
7 
8 class Imu : public Phidget
9 {
10  public:
11  Imu();
12 
13  virtual ~Imu();
14 
15  protected:
16  void zero();
17  void setDataRate(int rate);
18 
19  int setCompassCorrectionParameters(double cc_mag_field, double cc_offset0,
20  double cc_offset1, double cc_offset2,
21  double cc_gain0, double cc_gain1,
22  double cc_gain2, double cc_T0,
23  double cc_T1, double cc_T2, double cc_T3,
24  double cc_T4, double cc_T5);
25 
26  virtual void dataHandler(const double acceleration[3],
27  const double angularRate[3],
28  const double magneticField[3], double timestamp);
29 
30  private:
31  CPhidgetSpatialHandle imu_handle_;
32 
33  static int SpatialDataHandler(CPhidgetSpatialHandle spatial, void *userptr,
34  CPhidgetSpatial_SpatialEventDataHandle *data,
35  int count);
36 };
37 
38 } // namespace phidgets
39 
40 #endif // PHIDGETS_API_IMU_H
virtual ~Imu()
Definition: imu.cpp:21
void setDataRate(int rate)
Definition: imu.cpp:25
virtual void dataHandler(const double acceleration[3], const double angularRate[3], const double magneticField[3], double timestamp)
Definition: imu.cpp:51
void zero()
Definition: imu.cpp:30
int setCompassCorrectionParameters(double cc_mag_field, double cc_offset0, double cc_offset1, double cc_offset2, double cc_gain0, double cc_gain1, double cc_gain2, double cc_T0, double cc_T1, double cc_T2, double cc_T3, double cc_T4, double cc_T5)
Definition: imu.cpp:61
static int SpatialDataHandler(CPhidgetSpatialHandle spatial, void *userptr, CPhidgetSpatial_SpatialEventDataHandle *data, int count)
Definition: imu.cpp:36
CPhidgetSpatialHandle imu_handle_
Definition: imu.h:31


phidgets_api
Author(s): Tully Foote, Ivan Dryanovski
autogenerated on Fri Apr 9 2021 02:56:02