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:
47  SimuImu(const core::FrameworkManager *parent, std::string name,
48  uint32_t dev_id, uint8_t priority);
49 
60  SimuImu(const core::IODevice *parent, std::string name, uint32_t dev_id);
61 
66  ~SimuImu();
67 
68 private:
75  void Run(void);
76 
84  void UpdateFrom(const core::io_data *data);
85 
86  typedef struct {
87  float q0;
88  float q1;
89  float q2;
90  float q3;
91  float wx;
92  float wy;
93  float wz;
94  } imu_states_t;
95  gui::SpinBox *data_rate;
96  core::SharedMem *shmem;
97  core::AhrsData *ahrsData;
98 };
99 } // end namespace sensor
100 } // end namespace flair
101 #endif // SIMUIMU_H
Abstract class for data types.
Definition: io_data.h:94
Abstract class for input/ouput system.
Definition: IODevice.h:44
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:43
SimuImu(const core::FrameworkManager *parent, std::string name, uint32_t dev_id, uint8_t priority)
Constructor.
Class for a simulation Imu.
Definition: SimuImu.h:35
Main class of the Framework library.
Definition: FrameworkManager.h:45
Abstract class for a thread.
Class defining a shared memory.
Definition: SharedMem.h:32
Abstract class for a thread.
Definition: Thread.h:38