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