Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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 #if H_CTL_YAW_LOOP
48 extern float h_ctl_yaw_dgain;
49 extern float h_ctl_yaw_ny_igain;
50 #endif
51 
52 
53 #define H_CTL_ROLL_SUM_ERR_MAX (MAX_PPRZ/2.)
54 #define H_CTL_PITCH_SUM_ERR_MAX (MAX_PPRZ/2.)
55 
56 #define stabilization_adaptive_SetRollIGain(_gain) { \
57  h_ctl_roll_sum_err = 0.; \
58  h_ctl_roll_igain = _gain; \
59  }
60 
61 #define stabilization_adaptive_SetPitchIGain(_gain) { \
62  h_ctl_pitch_sum_err = 0.; \
63  h_ctl_pitch_igain = _gain; \
64  }
65 
66 extern bool use_airspeed_ratio;
67 
68 #endif /* FW_H_CTL_A_H */
h_ctl_pitch_sum_err
float h_ctl_pitch_sum_err
Definition: stabilization_adaptive.c:175
h_ctl_roll_Kffd
float h_ctl_roll_Kffd
Definition: stabilization_adaptive.c:163
paparazzi.h
std.h
use_airspeed_ratio
bool use_airspeed_ratio
Definition: stabilization_adaptive.c:199
h_ctl_roll_Kffa
float h_ctl_roll_Kffa
Definition: stabilization_adaptive.c:162
h_ctl_roll_igain
float h_ctl_roll_igain
Definition: stabilization_adaptive.c:160
h_ctl_pitch_of_roll
float h_ctl_pitch_of_roll
Definition: stabilization_adaptive.c:197
h_ctl_pitch_igain
float h_ctl_pitch_igain
Definition: stabilization_adaptive.c:174
h_ctl_roll_sum_err
float h_ctl_roll_sum_err
Definition: stabilization_adaptive.c:161
inttypes.h
h_ctl_pitch_Kffa
float h_ctl_pitch_Kffa
Definition: stabilization_adaptive.c:176
h_ctl_pitch_Kffd
float h_ctl_pitch_Kffd
Definition: stabilization_adaptive.c:177