MAV'RIC
conf_stabilisation_hybrid.h
1 /*
2  * conf_stabilisation_hybrid.h
3  *
4  * Default values for stabilisation
5  *
6  * Created: 13/11/2013 17:46:00
7  * Author: Julien
8  */
9 
10 #ifndef CONF_STABILISATION_HYBRID_H_
11 #define CONF_STABILISATION_HYBRID_H_
12 
13 #include "stabilisation_hybrid.h"
14 
15 static Stabiliser_Stack_hybrid_t stabiliser_defaults_hybrid =
16 {
17 // #############################################################################
18 // ###### RATE CONTROL #######################################################
19 // #############################################################################
20  .rate_stabiliser={
22  // -----------------------------------------------------------------
23  // ------ ROLL PID -------------------------------------------------
24  // -----------------------------------------------------------------
25  {
26  .p_gain = 1.0,
27  .clip_min = -1.0,
28  .clip_max = 1.0,
29  .integrator={
30  .pregain = 0.0,
31  .postgain = 0.0,
32  .accumulator = 0.0,
33  .clip = 0.0,
34  .leakiness = 0.0
35  },
36  .differentiator={
37  .gain = 0.0,
38  .previous = 0.0,
39  .LPF = 0.0,
40  .clip = 0.0
41  },
42  .output = 0.0,
43  .error = 0.0,
44  .last_update = 0.0,
45  .dt = 1,
46  .soft_zone_width = 0.0
47  },
48  // -----------------------------------------------------------------
49  // ------ PITCH PID ------------------------------------------------
50  // -----------------------------------------------------------------
51  {
52  .p_gain = 3.0,
53  .clip_min = -1.0,
54  .clip_max = 1.0,
55  .integrator={
56  .pregain = 0.0,
57  .postgain = 0.0,
58  .accumulator = 0.0,
59  .clip = 0.0,
60  .leakiness = 0.0
61  },
62  .differentiator={
63  .gain = 0.0,
64  .previous = 0.0,
65  .LPF = 0.0,
66  .clip = 0.0
67  },
68  .output = 0.0,
69  .error = 0.0,
70  .last_update = 0.0,
71  .dt = 1,
72  .soft_zone_width = 0.0
73  },
74  // -----------------------------------------------------------------
75  // ------ YAW PID --------------------------------------------------
76  // -----------------------------------------------------------------
77  {
78  .p_gain = 3.0,
79  .clip_min = -1.0,
80  .clip_max = 1.0,
81  .integrator={
82  .pregain = 0.0,
83  .postgain = 0.0,
84  .accumulator = 0.0,
85  .clip = 0.0,
86  .leakiness = 0.0
87  },
88  .differentiator={
89  .gain = 0.0,
90  .previous = 0.0,
91  .LPF = 0.0,
92  .clip = 0.0
93  },
94  .output = 0.0,
95  .error = 0.0,
96  .last_update = 0.0,
97  .dt = 1,
98  .soft_zone_width = 0.0
99  }
100  },
101  // ---------------------------------------------------------------------
102  // ------ THRUST PID ---------------------------------------------------
103  // ---------------------------------------------------------------------
104  .thrust_controller={
105  .p_gain = 1.0,
106  .clip_min = -1000,
107  .clip_max = 1000,
108  .integrator={
109  .pregain = 0.0,
110  .postgain = 0.0,
111  .accumulator = 0.0,
112  .clip = 0.0,
113  .leakiness = 0.0
114  },
115  .differentiator={
116  .gain = 0.0,
117  .previous = 0.0,
118  .LPF = 0.0,
119  .clip = 0.0
120  },
121  .output = 0.0,
122  .error = 0.0,
123  .last_update = 0.0,
124  .dt = 1,
125  .soft_zone_width = 0.0
126  },
127  // ---------------------------------------------------------------------
128  // ------ OUTPUT -------------------------------------------------------
129  // ---------------------------------------------------------------------
130  .output = {
131  .rpy = {0.0, 0.0, 0.0},
132  .thrust = 0.0,
133  .tvel = {0.0, 0.0, 0.0},
134  .theading = 0.0,
135  .control_mode = RATE_COMMAND_MODE,
136  .yaw_mode = YAW_RELATIVE,
137  .run_mode = MOTORS_OFF
138  },
139  },
140 // #############################################################################
141 // ###### ATTITUDE CONTROL ###################################################
142 // #############################################################################
143  .attitude_stabiliser={
144  .rpy_controller={
145  // -----------------------------------------------------------------
146  // ------ ROLL PID -------------------------------------------------
147  // -----------------------------------------------------------------
148  {
149  .p_gain = 1.0,
150  .clip_min = -1000,
151  .clip_max = 1000,
152  .integrator={
153  .pregain = 0.0,
154  .postgain = 0.0,
155  .accumulator = 0.0,
156  .clip = 0.0,
157  .leakiness = 0.0
158  },
159  .differentiator={
160  .gain = 0.0,
161  .previous = 0.0,
162  .LPF = 0.0,
163  .clip = 0.0
164  },
165  .output = 0.0,
166  .error = 0.0,
167  .last_update = 0.0,
168  .dt = 1,
169  .soft_zone_width = 0.0
170  },
171  // -----------------------------------------------------------------
172  // ------ PITCH PID ------------------------------------------------
173  // -----------------------------------------------------------------
174  {
175  .p_gain = 1.5,
176  .clip_min = -1.0,
177  .clip_max = 1.0,
178  .integrator={
179  .pregain = 0.0,
180  .postgain = 0.0,
181  .accumulator = 0.0,
182  .clip = 0.0,
183  .leakiness = 0.0
184  },
185  .differentiator={
186  .gain = 0.0,
187  .previous = 0.0,
188  .LPF = 0.0,
189  .clip = 0.0
190  },
191  .output = 0.0,
192  .error = 0.0,
193  .last_update = 0.0,
194  .dt = 1,
195  .soft_zone_width = 0.0
196  },
197  // -----------------------------------------------------------------
198  // ------ YAW PID --------------------------------------------------
199  // -----------------------------------------------------------------
200  {
201  .p_gain = 1.5,
202  .clip_min = -1.0,
203  .clip_max = 1.0,
204  .integrator={
205  .pregain = 0.0,
206  .postgain = 0.0,
207  .accumulator = 0.0,
208  .clip = 0.0,
209  .leakiness = 0.0
210  },
211  .differentiator={
212  .gain = 0.0,
213  .previous = 0.0,
214  .LPF = 0.0,
215  .clip = 0.0
216  },
217  .output = 0.0,
218  .error = 0.0,
219  .last_update = 0.0,
220  .dt = 1,
221  .soft_zone_width = 0.0
222  }
223  },
224  // ---------------------------------------------------------------------
225  // ------ THRUST PID ---------------------------------------------------
226  // ---------------------------------------------------------------------
227  .thrust_controller={
228  .p_gain = 0.0,
229  .clip_min = -1000,
230  .clip_max = 1000,
231  .integrator={
232  .pregain = 0.0,
233  .postgain = 0.0,
234  .accumulator = 0.0,
235  .clip = 0.0,
236  .leakiness = 0.0
237  },
238  .differentiator={
239  .gain = 0.0,
240  .previous = 0.0,
241  .LPF = 0.0,
242  .clip = 0.0
243  },
244  .output = 0.0,
245  .error = 0.0,
246  .last_update = 0.0,
247  .dt = 1,
248  .soft_zone_width = 0.0
249  },
250  // ---------------------------------------------------------------------
251  // ------ OUTPUT -------------------------------------------------------
252  // ---------------------------------------------------------------------
253  .output = {
254  .rpy = {0.0, 0.0, 0.0},
255  .thrust = 0.0,
256  .tvel = {0.0, 0.0, 0.0},
257  .theading = 0.0,
258  .control_mode = RATE_COMMAND_MODE,
259  .yaw_mode = YAW_RELATIVE,
260  .run_mode = MOTORS_OFF
261  },
262  }
263 };
264 
265 
266 #endif /* CONF_STABILISATION_HYBRID_H_ */
float p_gain
Proportional gain.
Definition: pid_controller.h:97
Definition: stabilisation_hybrid.h:49
pid_controller_t rpy_controller[3]
roll pitch yaw controllers
Definition: stabilisation.h:91