Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
stabilization_attitude.h
Go to the documentation of this file.
1 /*
2  * Paparazzi $Id$
3  *
4  * Copyright (C) 2006 Pascal Brisset, Antoine Drouin, Michel Gorraz
5  *
6  * This file is part of paparazzi.
7  *
8  * paparazzi is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * paparazzi is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with paparazzi; see the file COPYING. If not, write to
20  * the Free Software Foundation, 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  *
23  */
24 
31 #ifndef FW_H_CTL_H
32 #define FW_H_CTL_H
33 
34 #include <inttypes.h>
35 #include "std.h"
36 #include "paparazzi.h"
37 #include "generated/airframe.h"
38 
39 /* outer loop parameters */
40 extern float h_ctl_course_setpoint; /* rad, CW/north */
41 extern float h_ctl_course_pre_bank;
43 extern float h_ctl_course_pgain;
44 extern float h_ctl_course_dgain;
45 extern float h_ctl_roll_max_setpoint;
46 
47 #ifdef LOITER_TRIM
48 extern float v_ctl_auto_throttle_loiter_trim;
49 extern float v_ctl_auto_throttle_dash_trim;
50 #endif
51 
52 /* roll and pitch disabling */
53 extern bool_t h_ctl_disabled;
54 
55 /* AUTO1 rate mode */
56 extern bool_t h_ctl_auto1_rate;
57 
58 /* inner roll loop parameters */
59 extern float h_ctl_roll_setpoint;
60 extern float h_ctl_roll_pgain;
62 extern float h_ctl_roll_slew;
63 
64 #ifdef USE_AOA
65 /* Pitch mode */
66 #define H_CTL_PITCH_MODE_THETA 0
67 #define H_CTL_PITCH_MODE_AOA 1
68 extern uint8_t h_ctl_pitch_mode;
69 #endif
70 
71 /* inner pitch loop parameters */
72 extern float h_ctl_pitch_setpoint;
73 extern float h_ctl_pitch_loop_setpoint;
74 extern float h_ctl_pitch_pgain;
75 extern float h_ctl_pitch_dgain;
77 
78 /* inner loop pre-command */
79 extern float h_ctl_aileron_of_throttle;
80 extern float h_ctl_elevator_of_roll;
81 
82 /* rate loop */
83 
84 #ifdef H_CTL_RATE_LOOP
85 extern float h_ctl_roll_rate_mode;
86 extern float h_ctl_roll_rate_setpoint_pgain;
87 extern float h_ctl_roll_rate_pgain;
88 extern float h_ctl_hi_throttle_roll_rate_pgain;
89 extern float h_ctl_lo_throttle_roll_rate_pgain;
90 extern float h_ctl_roll_rate_igain;
91 extern float h_ctl_roll_rate_dgain;
92 
93 #define stabilization_attitude_SetRollRatePGain(v) { h_ctl_hi_throttle_roll_rate_pgain = v; h_ctl_lo_throttle_roll_rate_pgain = v; }
94 #endif
95 
96 extern void h_ctl_init( void );
97 extern void h_ctl_course_loop ( void );
98 extern void h_ctl_attitude_loop ( void );
99 
100 extern float h_ctl_roll_attitude_gain;
101 extern float h_ctl_roll_rate_gain;
102 
103 #endif /* FW_H_CTL_H */
float h_ctl_pitch_dgain
float h_ctl_course_pre_bank_correction
float h_ctl_roll_pgain
void h_ctl_init(void)
float h_ctl_aileron_of_throttle
float h_ctl_pitch_pgain
float h_ctl_roll_attitude_gain
int16_t pprz_t
Definition: paparazzi.h:6
float h_ctl_roll_slew
float h_ctl_course_pgain
void h_ctl_course_loop(void)
float h_ctl_pitch_setpoint
float h_ctl_roll_rate_gain
float h_ctl_course_setpoint
fixed wing horizontal control
float h_ctl_roll_setpoint
float h_ctl_elevator_of_roll
pprz_t h_ctl_elevator_setpoint
pprz_t h_ctl_aileron_setpoint
float h_ctl_course_pre_bank
unsigned char uint8_t
Definition: types.h:14
bool_t h_ctl_auto1_rate
float h_ctl_pitch_loop_setpoint
float h_ctl_course_dgain
void h_ctl_attitude_loop(void)
bool_t h_ctl_disabled
float h_ctl_roll_max_setpoint