Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_adaptive.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 ENAC
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
29 #ifndef FW_H_CTL_A_H
30 #define FW_H_CTL_A_H
31 
32 #include <inttypes.h>
33 #include "std.h"
34 #include "paparazzi.h"
35 #include "generated/airframe.h"
36 
37 extern float h_ctl_roll_sum_err;
38 extern float h_ctl_pitch_sum_err;
39 extern float h_ctl_roll_igain;
40 extern float h_ctl_pitch_igain;
41 extern float h_ctl_roll_Kffa;
42 extern float h_ctl_roll_Kffd;
43 extern float h_ctl_pitch_Kffa;
44 extern float h_ctl_pitch_Kffd;
45 extern float h_ctl_pitch_of_roll;
46 
47 #define H_CTL_ROLL_SUM_ERR_MAX (MAX_PPRZ/2.)
48 #define H_CTL_PITCH_SUM_ERR_MAX (MAX_PPRZ/2.)
49 
50 #define stabilization_adaptive_SetRollIGain(_gain) { \
51  h_ctl_roll_sum_err = 0.; \
52  h_ctl_roll_igain = _gain; \
53  }
54 
55 #define stabilization_adaptive_SetPitchIGain(_gain) { \
56  h_ctl_pitch_sum_err = 0.; \
57  h_ctl_pitch_igain = _gain; \
58  }
59 
60 extern bool_t use_airspeed_ratio;
61 
62 #endif /* FW_H_CTL_A_H */
float h_ctl_pitch_igain
float h_ctl_pitch_of_roll
bool_t use_airspeed_ratio
float h_ctl_pitch_Kffd
float h_ctl_pitch_Kffa
float h_ctl_roll_Kffa
float h_ctl_pitch_sum_err
float h_ctl_roll_Kffd
float h_ctl_roll_sum_err
float h_ctl_roll_igain