Flair
Framework Libre Air
SimuImu.h
Go to the documentation of this file.
1 // %flair:license{
2 // This file is part of the Flair framework distributed under the
3 // CECILL-C License, Version 1.0.
4 // %flair:license}
13 #ifndef SIMUIMU_H
14 #define SIMUIMU_H
15 
16 #include <Imu.h>
17 #include <Thread.h>
18 
19 namespace flair {
20  namespace core {
21  class SharedMem;
22  class AhrsData;
23  }
24  namespace gui {
25  class SpinBox;
26  }
27 }
28 
29 namespace flair {
30 namespace sensor {
35 class SimuImu : public Imu, public core::Thread {
36 public:
48  SimuImu(std::string name,
49  uint32_t modelId,uint32_t deviceId, uint8_t priority);
50 
62  SimuImu(const core::IODevice *parent, std::string name, uint32_t modelId,uint32_t deviceId);
63 
68  ~SimuImu();
69 
70 private:
77  void Run(void);
78 
86  void UpdateFrom(const core::io_data *data);
87 
88  typedef struct {
89  float q0;
90  float q1;
91  float q2;
92  float q3;
93  float wx;
94  float wy;
95  float wz;
96  float ax;
97  float ay;
98  float az;
99  float mx;
100  float my;
101  float mz;
102  } imu_states_t;
103 
104  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
105 
106  gui::SpinBox *dataRate;
107  core::SharedMem *shmem;
108  core::AhrsData *ahrsData;
109 };
110 } // end namespace sensor
111 } // end namespace flair
112 #endif // SIMUIMU_H
Abstract class for data types.
Definition: io_data.h:94
Abstract class for input/ouput system.
Definition: IODevice.h:45
namespace of the flair Framework
Definition: Ahrs.h:19
Base class for Imu.
Class displaying a QSpinBox on the ground station.
Definition: SpinBox.h:28
~SimuImu()
Destructor.
Class defining AHRS datas.
Definition: AhrsData.h:30
Base class for Imu.
Definition: Imu.h:44
Class for a simulation Imu.
Definition: SimuImu.h:35
Abstract class for a thread.
Class defining a shared memory.
Definition: SharedMem.h:32
Abstract class for a thread.
Definition: Thread.h:38
SimuImu(std::string name, uint32_t modelId, uint32_t deviceId, uint8_t priority)
Constructor.