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:
57  Imu(std::string name,bool needRotation=true);
58 
68  Imu(const core::IODevice *parent, std::string name);
69 
74  ~Imu();
75 
81  const core::ImuData *GetDatas(void) const;
82 
83 
89  gui::Layout *GetLayout(void) const;
90 
95  void LockUserInterface(void) const;
96 
101  void UnlockUserInterface(void) const;
102 
107  void UseDefaultPlot(void);
108 
114  gui::Tab *GetPlotTab(void) const;
115 
122 
123 
124 protected:
130  gui::GroupBox *GetGroupBox(void) const;
131 
140  void ApplyRotation(core::Vector3Df& vector);
141 
150  void ApplyRotation(core::Quaternion& quaternion);
151 
159  void GetDatas(core::ImuData **imuData) const;
160 
161 private:
162  gui::Tab *mainTab, *sensorTab, *plotTab;
163  gui::TabWidget *tab;
164  gui::GroupBox *setupGroupbox;
165  core::OneAxisRotation *rotation;
166  core::ImuData *imuData;
167 
168  gui::DataPlot1D *axPlot, *ayPlot, *azPlot;
169  gui::DataPlot1D *gxPlot, *gyPlot, *gzPlot;
170  gui::DataPlot1D *mxPlot, *myPlot, *mzPlot;
171 };
172 } // end namespace sensor
173 } // end namespace flair
174 
175 #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, bool needRotation=true)
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