Flair
Framework Libre Air
SimulatedImu.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 SIMULATEDIMU_H
14 #define SIMULATEDIMU_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 SimulatedImu : public Imu, public core::Thread {
36 public:
48  SimulatedImu(std::string name,
49  uint32_t modelId,uint32_t deviceId, uint8_t priority);
50 
55  ~SimulatedImu();
56 
57 private:
64  void Run(void);
65 
73  void UpdateFrom(const core::io_data *data){};
74 
75  typedef struct {
76  float q0;
77  float q1;
78  float q2;
79  float q3;
80  float wx;
81  float wy;
82  float wz;
83  float ax;
84  float ay;
85  float az;
86  float mx;
87  float my;
88  float mz;
89  } imu_states_t;
90 
91  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
92 
93  gui::SpinBox *dataRate;
94  core::SharedMem *shmem;
95  core::AhrsData *ahrsData;
96 };
97 } // end namespace sensor
98 } // end namespace flair
99 #endif // SIMULATEDIMU_H
Abstract class for data types.
Definition: io_data.h:94
namespace of the flair Framework
Definition: Ahrs.h:19
Class for a simulation Imu.
Definition: SimulatedImu.h:35
Base class for Imu.
Class displaying a QSpinBox on the ground station.
Definition: SpinBox.h:28
Class defining AHRS datas.
Definition: AhrsData.h:30
SimulatedImu(std::string name, uint32_t modelId, uint32_t deviceId, uint8_t priority)
Constructor.
Base class for Imu.
Definition: Imu.h:44
Abstract class for a thread.
Class defining a shared memory.
Definition: SharedMem.h:32
Abstract class for a thread.
Definition: Thread.h:38