Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_attitude.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2006 Pascal Brisset, Antoine Drouin, Michel Gorraz
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_H
30#define FW_H_CTL_H
31
32#include <inttypes.h>
33#include "std.h"
34#include "paparazzi.h"
35#include "generated/airframe.h"
36
37/* outer loop parameters */
38extern float h_ctl_course_setpoint; /* rad, CW/north */
39extern float h_ctl_course_pre_bank;
41extern float h_ctl_course_pgain;
42extern float h_ctl_course_dgain;
43extern float h_ctl_roll_max_setpoint;
44
45#ifdef LOITER_TRIM
48#endif
49
50/* roll and pitch disabling */
51extern bool h_ctl_disabled;
52
53/* AUTO1 rate mode */
54extern bool h_ctl_auto1_rate;
55
56/* inner roll loop parameters */
57extern float h_ctl_roll_setpoint;
58extern float h_ctl_roll_pgain;
60extern float h_ctl_roll_slew;
61
62#ifdef USE_AOA
63/* Pitch mode */
64#define H_CTL_PITCH_MODE_THETA 0
65#define H_CTL_PITCH_MODE_AOA 1
67#endif
68
69/* inner pitch loop parameters */
70extern float h_ctl_pitch_setpoint;
71extern float h_ctl_pitch_loop_setpoint;
72extern float h_ctl_pitch_pgain;
73extern float h_ctl_pitch_dgain;
75
76/* inner yaw loop parameters */
77#if H_CTL_YAW_LOOP
78extern float h_ctl_yaw_rate_setpoint;
80#endif
81
82/* inner CL loop parameters */
83#if H_CTL_CL_LOOP
85#endif
86
87
88/* inner loop pre-command */
89extern float h_ctl_aileron_of_throttle;
90extern float h_ctl_elevator_of_roll;
91
92/* rate loop */
93
94#ifdef H_CTL_RATE_LOOP
95extern float h_ctl_roll_rate_mode;
97extern float h_ctl_roll_rate_pgain;
100extern float h_ctl_roll_rate_igain;
101extern float h_ctl_roll_rate_dgain;
102
103#define stabilization_attitude_SetRollRatePGain(v) { h_ctl_hi_throttle_roll_rate_pgain = v; h_ctl_lo_throttle_roll_rate_pgain = v; }
104#endif
105
106extern void h_ctl_init(void);
107extern void h_ctl_course_loop(void);
108extern void h_ctl_attitude_loop(void);
109
110extern float h_ctl_roll_attitude_gain;
111extern float h_ctl_roll_rate_gain;
112
113#endif /* FW_H_CTL_H */
void h_ctl_course_loop(void)
float h_ctl_pitch_setpoint
pprz_t h_ctl_elevator_setpoint
float h_ctl_course_dgain
float h_ctl_roll_pgain
float h_ctl_roll_max_setpoint
bool h_ctl_disabled
float h_ctl_elevator_of_roll
float h_ctl_roll_setpoint
float h_ctl_pitch_dgain
pprz_t h_ctl_aileron_setpoint
float h_ctl_pitch_pgain
bool h_ctl_auto1_rate
float h_ctl_roll_rate_gain
void h_ctl_init(void)
void h_ctl_attitude_loop(void)
float h_ctl_roll_attitude_gain
float h_ctl_aileron_of_throttle
float h_ctl_course_pgain
float h_ctl_pitch_loop_setpoint
float h_ctl_roll_slew
float h_ctl_course_pre_bank_correction
float h_ctl_course_pre_bank
float h_ctl_course_setpoint
uint16_t foo
Definition main_demo5.c:58
int16_t pprz_t
Definition paparazzi.h:6
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.