Flair
Framework Libre Air
Imu.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 IMU_H
14 #define IMU_H
15 
16 #include <IODevice.h>
17 #include <Vector3D.h>
18 
19 namespace flair {
20  namespace core {
21  class ImuData;
22  class OneAxisRotation;
23  }
24  namespace gui {
25  class Tab;
26  class TabWidget;
27  class GroupBox;
28  class Layout;
29  class DataPlot1D;
30  }
31 }
32 
33 class Ahrs_impl;
34 
35 namespace flair {
36 namespace sensor {
44 class Imu : public core::IODevice {
45  friend class ::Ahrs_impl;
46 
47 public:
56  Imu(std::string name);
57 
67  Imu(const core::IODevice *parent, std::string name);
68 
73  ~Imu();
74 
80  const core::ImuData *GetDatas(void) const;
81 
82 
88  gui::Layout *GetLayout(void) const;
89 
94  void LockUserInterface(void) const;
95 
100  void UnlockUserInterface(void) const;
101 
106  void UseDefaultPlot(void);
107 
113  gui::Tab *GetPlotTab(void) const;
114 
121 
122 
123 protected:
129  gui::GroupBox *GetGroupBox(void) const;
130 
139  void ApplyRotation(core::Vector3Df& vector);
140 
149  void ApplyRotation(core::Quaternion& quaternion);
150 
158  void GetDatas(core::ImuData **imuData) const;
159 
160 private:
161  gui::Tab *mainTab, *sensorTab, *plotTab;
162  gui::TabWidget *tab;
163  gui::GroupBox *setupGroupbox;
164  core::OneAxisRotation *rotation;
165  core::ImuData *imuData;
166 
167  gui::DataPlot1D *axPlot, *ayPlot, *azPlot;
168  gui::DataPlot1D *gxPlot, *gyPlot, *gzPlot;
169  gui::DataPlot1D *mxPlot, *myPlot, *mzPlot;
170 };
171 } // end namespace sensor
172 } // end namespace flair
173 
174 #endif // IMU_H
void UnlockUserInterface(void) const
Unlock user interface.
Abstract class for input/ouput system.
Definition: IODevice.h:45
namespace of the flair Framework
Definition: Ahrs.h:19
gui::GroupBox * GetGroupBox(void) const
Setup GroupBox.
Class displaying a QGroupBox on the ground station.
Definition: GroupBox.h:27
core::OneAxisRotation * GetOneAxisRotation(void) const
Get OneAxisRotation.
~Imu()
Destructor.
Class defining a 3D vector.
gui::Layout * GetLayout(void) const
Setup Layout.
Class defining a rotation around one axis.
Definition: OneAxisRotation.h:38
void UseDefaultPlot(void)
Use default plot.
Base class for Imu.
Definition: Imu.h:44
Abstract class for input/ouput system.
void LockUserInterface(void) const
Lock user interface.
Abstract class to display a layout on the ground station.
Definition: Layout.h:33
gui::Tab * GetPlotTab(void) const
Plot tab.
Class displaying a QTabWidget on the ground station.
Definition: TabWidget.h:29
void ApplyRotation(core::Vector3Df &vector)
ApplyRotation.
Imu(std::string name)
Constructor.
const core::ImuData * GetDatas(void) const
Get IMU datas.
Class displaying a 1D plot on the ground station.
Definition: DataPlot1D.h:33
Class defining a quaternion.
Definition: Quaternion.h:26
Class displaying a QTab on the ground station.
Definition: Tab.h:29
Class defining IMU datas.
Definition: ImuData.h:31