Flair
Framework Libre Air
X4.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: 2012/08/21
6 // filename: X4.h
7 //
8 // author: Osamah Saif, Guillaume Sanahuja
9 // Copyright Heudiasyc UMR UTC/CNRS 7253
10 //
11 // version: $Id: $
12 //
13 // purpose: classe definissant un x4
14 //
15 /*********************************************************************/
16 
17 #ifndef X4_H
18 #define X4_H
19 
20 #include <Model.h>
21 
22 namespace flair {
23 namespace core {
24 class Mutex;
25 }
26 namespace gui {
27 class DoubleSpinBox;
28 class SpinBox;
29 }
30 namespace actuator {
31 class SimuBldc;
32 }
33 }
34 
35 #ifdef GL
36 namespace irr {
37 namespace scene {
38 class IMesh;
39 }
40 }
41 #endif
42 
43 namespace flair {
44 namespace simulator {
45 class Blade;
46 
47 class X4 : public Model {
48 public:
49  X4(std::string name, uint32_t modelId);
50  ~X4();
51 #ifdef GL
52  virtual void Draw(void) override;
53  virtual void ExtraDraw(void) override{};
54 #endif
55  float Thrust(void) const;
56 
57 private:
58  void CalcModel(void) override;
59 #ifdef GL
60  void AnimateModel(void) override;
61  size_t dbtSize(void) const override;
62  void WritedbtBuf(char *dbtbuf) override;
63  void ReaddbtBuf(char *dbtbuf) override;
64  Blade *fl_blade, *fr_blade, *rl_blade, *rr_blade;
65  core::Mutex *motor_speed_mutex;
66  irr::scene::IMesh *colored_arm;
67 #endif
68 
69  actuator::SimuBldc *motors;
70  float motor_speed[4];
71  gui::DoubleSpinBox *arm_length, *l_cg;
72  gui::DoubleSpinBox *k_mot, *c_mot;
73  gui::DoubleSpinBox *f_air_vert, *f_air_lat;
74  gui::DoubleSpinBox *j_roll, *j_pitch, *j_yaw;
75  gui::SpinBox *motorTimeout;
76  gui::SpinBox *armColorR,*armColorG,*armColorB;
77 };
78 } // end namespace simulator
79 } // end namespace flair
80 #endif // X4_H
namespace of the flair Framework
Definition: Ahrs.h:19
Definition: Blade.h:33
Definition: X4.h:47
Class defining a mutex.
Definition: Mutex.h:29
Class displaying a QSpinBox on the ground station.
Definition: SpinBox.h:28
Definition: Ball.h:22
Definition: Model.h:57
Class for a simulation bldc.
Definition: SimuBldc.h:31
Class displaying a QDoubleSpinBox on the ground station.
Definition: DoubleSpinBox.h:28