Flair
Framework Libre Air
X8.h
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 // created: 2014/04/03
6 // filename: X8.h
7 //
8 // author: Majd Saied, Guillaume Sanahuja
9 // Copyright Heudiasyc UMR UTC/CNRS 7253
10 //
11 // version: $Id: $
12 //
13 // purpose: classe definissant un X8
14 //
15 /*********************************************************************/
16 
17 #ifndef X8_H
18 #define X8_H
19 
20 #include <Model.h>
21 
22 namespace flair {
23 namespace core {
24 class Mutex;
25 }
26 namespace gui {
27 class DoubleSpinBox;
28 }
29 namespace actuator {
30 class SimuBldc;
31 }
32 }
33 
34 namespace flair {
35 namespace simulator {
36 class Blade;
37 
38 class X8 : public Model {
39 public:
40  X8(std::string name, uint32_t modelId);
41  ~X8();
42  virtual void Draw(void);
43  virtual void ExtraDraw(void){};
44 
45 protected:
46 #ifdef GL
47  Blade *tfl_blade, *tfr_blade, *trl_blade, *trr_blade;
48  Blade *bfl_blade, *bfr_blade, *brl_blade, *brr_blade;
49 #endif
50 private:
51  void CalcModel(void);
52 #ifdef GL
53  void AnimateModel(void);
54  size_t dbtSize(void) const;
55  void WritedbtBuf(char *dbtbuf);
56  void ReaddbtBuf(char *dbtbuf);
57  core::Mutex *motor_speed_mutex;
58 #endif
59 
60  actuator::SimuBldc *motors;
61  float motor_speed[8];
62  gui::DoubleSpinBox *m, *arm_length, *l_cg;
63  gui::DoubleSpinBox *k_mot, *c_mot;
64  gui::DoubleSpinBox *f_air_vert, *f_air_lat;
65  gui::DoubleSpinBox *j_roll, *j_pitch, *j_yaw;
66  gui::DoubleSpinBox *j_r, *sigma, *S;
67 };
68 } // end namespace simulator
69 } // end namespace flair
70 #endif // X8_H
namespace of the flair Framework
Definition: Ahrs.h:19
Definition: Blade.h:33
Class defining a mutex.
Definition: Mutex.h:29
Definition: Model.h:55
Class for a simulation bldc.
Definition: SimuBldc.h:37
Class displaying a QDoubleSpinBox on the ground station.
Definition: DoubleSpinBox.h:28
Definition: X8.h:38