Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_attitude_quat_indi.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Ewoud Smeur <ewoud_smeur@msn.com>
3  * MAVLab Delft University of Technology
4  *
5  * This control algorithm is Incremental Nonlinear Dynamic Inversion (INDI)
6  *
7  * This is a simplified implementation of the (soon to be) publication in the
8  * journal of Control Guidance and Dynamics: Adaptive Incremental Nonlinear
9  * Dynamic Inversion for Attitude Control of Micro Aerial Vehicles
10  *
11  * This file is part of paparazzi.
12  *
13  * paparazzi is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2, or (at your option)
16  * any later version.
17  *
18  * paparazzi is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with paparazzi; see the file COPYING. If not, write to
25  * the Free Software Foundation, 59 Temple Place - Suite 330,
26  * Boston, MA 02111-1307, USA.
27  */
28 
33 #ifndef STABILIZATION_ATTITUDE_QUAT_INDI_H
34 #define STABILIZATION_ATTITUDE_QUAT_INDI_H
35 
37 
39  float err_p;
40  float err_q;
41  float err_r;
42  float rate_p;
43  float rate_q;
44  float rate_r;
45 };
46 
47 struct IndiVariables {
52  struct FloatRates du;
54  struct FloatRates u_in;
55  struct FloatRates u;
56  struct FloatRates udot;
58 };
59 
60 extern struct FloatRates g1;
61 extern float g2;
63 
64 extern struct FloatRates g_est;
65 extern bool_t use_adaptive_indi;
66 
67 extern struct Int32Eulers stab_att_sp_euler;
68 extern struct Int32Quat stab_att_sp_quat;
69 
70 void stabilization_indi_second_order_filter(struct FloatRates *input, struct FloatRates *filter_ddx,
71  struct FloatRates *filter_dx, struct FloatRates *filter_x, float omega, float zeta, float omega_r);
72 void lms_estimation(void);
73 
74 #endif /* STABILIZATION_ATTITUDE_QUAT_INT_H */
75 
void lms_estimation(void)
void stabilization_indi_second_order_filter(struct FloatRates *input, struct FloatRates *filter_ddx, struct FloatRates *filter_dx, struct FloatRates *filter_x, float omega, float zeta, float omega_r)
struct Int32Quat stab_att_sp_quat
with INT32_QUAT_FRAC
static const float omega_r[]
struct FloatRates angular_accel_ref
struct FloatRates g_est
bool_t use_adaptive_indi
euler angles
struct ReferenceSystem reference_acceleration
struct FloatRates g1
struct FloatRates filtered_rate_deriv
Butterworth2LowPass_int filter_x
Definition: hf_float.c:105
Rotorcraft attitude reference generation.
Rotation quaternion.
angular rates
struct FloatRates filtered_rate_2deriv
struct Int32Eulers stab_att_sp_euler
with INT32_ANGLE_FRAC