1 | /*! |
---|
2 | * \file Ahrs.h |
---|
3 | * \brief Abstract class for AHRS |
---|
4 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253 |
---|
5 | * \date 2014/01/14 |
---|
6 | * \version 4.0 |
---|
7 | */ |
---|
8 | |
---|
9 | #ifndef AHRS_H |
---|
10 | #define AHRS_H |
---|
11 | |
---|
12 | #include <IODevice.h> |
---|
13 | #include <DataPlot.h> |
---|
14 | |
---|
15 | namespace flair { |
---|
16 | namespace core { |
---|
17 | class Euler; |
---|
18 | class Vector3D; |
---|
19 | class ImuData; |
---|
20 | class Quaternion; |
---|
21 | class AhrsData; |
---|
22 | } |
---|
23 | namespace gui { |
---|
24 | class Tab; |
---|
25 | class DataPlot1D; |
---|
26 | } |
---|
27 | namespace sensor { |
---|
28 | class Imu; |
---|
29 | } |
---|
30 | } |
---|
31 | |
---|
32 | class Ahrs_impl; |
---|
33 | |
---|
34 | namespace flair { namespace filter { |
---|
35 | /*! \class Ahrs |
---|
36 | * |
---|
37 | * \brief Abstract class for AHRS |
---|
38 | * |
---|
39 | * Use this class to define a custom AHRS. This class is child |
---|
40 | * of an Imu class, which will provide measurements. \n |
---|
41 | * |
---|
42 | */ |
---|
43 | class Ahrs : public core::IODevice { |
---|
44 | public: |
---|
45 | /*! |
---|
46 | * \brief Constructor |
---|
47 | * |
---|
48 | * Construct an Ahrs. |
---|
49 | * |
---|
50 | * \param parent parent |
---|
51 | * \param name name |
---|
52 | */ |
---|
53 | Ahrs(const sensor::Imu* parent,std::string name); |
---|
54 | |
---|
55 | /*! |
---|
56 | * \brief Destructor |
---|
57 | * |
---|
58 | */ |
---|
59 | ~Ahrs(); |
---|
60 | |
---|
61 | /*! |
---|
62 | * \brief Get parent Imu |
---|
63 | * |
---|
64 | * This function is identical to (Imu*)Parent() |
---|
65 | */ |
---|
66 | const sensor::Imu *GetImu(void) const; |
---|
67 | |
---|
68 | /*! |
---|
69 | * \brief Get ahrs datas |
---|
70 | * |
---|
71 | * \return AhrsData |
---|
72 | */ |
---|
73 | const core::AhrsData *GetDatas(void) const; |
---|
74 | |
---|
75 | /*! |
---|
76 | * \brief Lock the graphical user interface |
---|
77 | * |
---|
78 | * When locked, parameters cannot be modified. |
---|
79 | * |
---|
80 | */ |
---|
81 | void LockUserInterface(void) const; |
---|
82 | |
---|
83 | /*! |
---|
84 | * \brief Unlock the graphical user interface |
---|
85 | * |
---|
86 | */ |
---|
87 | void UnlockUserInterface(void) const; |
---|
88 | |
---|
89 | /*! |
---|
90 | * \brief Use default plot |
---|
91 | * |
---|
92 | * Plot the datas defined in imudata, |
---|
93 | * and datas defined in Imu::imudata. |
---|
94 | * |
---|
95 | */ |
---|
96 | void UseDefaultPlot(void); |
---|
97 | |
---|
98 | /*! |
---|
99 | * \brief Add plot |
---|
100 | * |
---|
101 | * Add plot of an AhrsData to the default plot |
---|
102 | * |
---|
103 | * \param ahrsData ahrs datas to plot |
---|
104 | * \param color color to use |
---|
105 | */ |
---|
106 | void AddPlot(const core::AhrsData *ahrsData,gui::DataPlot::Color_t color); |
---|
107 | |
---|
108 | /*! |
---|
109 | * \brief Roll plot |
---|
110 | * |
---|
111 | * Use this plot to add own curves. |
---|
112 | * |
---|
113 | * \return plot |
---|
114 | * |
---|
115 | */ |
---|
116 | gui::DataPlot1D *RollPlot(void)const ; |
---|
117 | |
---|
118 | /*! |
---|
119 | * \brief Pitch plot |
---|
120 | * |
---|
121 | * Use this plot to add own curves. |
---|
122 | * |
---|
123 | * \return plot |
---|
124 | * |
---|
125 | */ |
---|
126 | gui::DataPlot1D *PitchPlot(void) const; |
---|
127 | |
---|
128 | /*! |
---|
129 | * \brief Yaw plot |
---|
130 | * |
---|
131 | * Use this plot to add own curves. |
---|
132 | * |
---|
133 | * \return plot |
---|
134 | * |
---|
135 | */ |
---|
136 | gui::DataPlot1D *YawPlot(void) const; |
---|
137 | |
---|
138 | /*! |
---|
139 | * \brief Rotation speed around x axis plot |
---|
140 | * |
---|
141 | * Use this plot to add own curves. |
---|
142 | * |
---|
143 | * \return plot |
---|
144 | * |
---|
145 | */ |
---|
146 | gui::DataPlot1D *WXPlot(void) const; |
---|
147 | |
---|
148 | /*! |
---|
149 | * \brief Rotation speed around y axis plot |
---|
150 | * |
---|
151 | * Use this plot to add own curves. |
---|
152 | * |
---|
153 | * \return plot |
---|
154 | * |
---|
155 | */ |
---|
156 | gui::DataPlot1D *WYPlot(void) const; |
---|
157 | |
---|
158 | /*! |
---|
159 | * \brief Rotation speed around z axis plot |
---|
160 | * |
---|
161 | * Use this plot to add own curves. |
---|
162 | * |
---|
163 | * \return plot |
---|
164 | * |
---|
165 | */ |
---|
166 | gui::DataPlot1D *WZPlot(void) const; |
---|
167 | |
---|
168 | protected: |
---|
169 | /*! |
---|
170 | * \brief Get ahrs datas |
---|
171 | * |
---|
172 | * \param ahrsData ahrs datas |
---|
173 | */ |
---|
174 | void GetDatas(core::AhrsData **ahrsData) const; |
---|
175 | |
---|
176 | private: |
---|
177 | class Ahrs_impl *pimpl_; |
---|
178 | }; |
---|
179 | } // end namespace filter |
---|
180 | } // end namespace flair |
---|
181 | #endif // AHRS_H |
---|