Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
stabilization_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 file is part of paparazzi.
6  *
7  * paparazzi is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * paparazzi is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with paparazzi; see the file COPYING. If not, write to
19  * the Free Software Foundation, 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22 
23 #ifndef STABILIZATION_INDI
24 #define STABILIZATION_INDI
25 
28 
29 // Scaling for the control effectiveness to make it readible
30 #define INDI_G_SCALING 1000.0
31 
32 extern struct Int32Quat stab_att_sp_quat;
33 extern struct Int32Eulers stab_att_sp_euler;
34 extern float g1g2[INDI_OUTPUTS][INDI_NUM_ACT];
35 extern float actuator_state_filt_vect[INDI_NUM_ACT];
36 
37 extern bool indi_use_adaptive;
38 
39 extern float *Bwls[INDI_OUTPUTS];
40 
41 struct Indi_gains {
42  struct FloatRates att;
43  struct FloatRates rate;
44 };
45 
46 extern struct Indi_gains indi_gains;
47 
48 extern void stabilization_indi_init(void);
49 extern void stabilization_indi_enter(void);
51 extern void stabilization_indi_set_rpy_setpoint_i(struct Int32Eulers *rpy);
53 extern void stabilization_indi_rate_run(struct FloatRates rate_ref, bool in_flight);
54 extern void stabilization_indi_attitude_run(struct Int32Quat quat_sp, bool in_flight);
55 extern void stabilization_indi_read_rc(bool in_flight, bool in_carefree, bool coordinated_turn);
56 
57 #endif /* STABILIZATION_INDI */
58 
stabilization_indi_set_earth_cmd_i
void stabilization_indi_set_earth_cmd_i(struct Int32Vect2 *cmd, int32_t heading)
Set attitude setpoint from command in earth axes.
Definition: stabilization_indi.c:349
stabilization_indi_read_rc
void stabilization_indi_read_rc(bool in_flight, bool in_carefree, bool coordinated_turn)
This function reads rc commands.
Definition: stabilization_indi.c:590
indi_use_adaptive
bool indi_use_adaptive
Definition: stabilization_indi.c:100
Int32Quat
Rotation quaternion.
Definition: pprz_algebra_int.h:99
stabilization_attitude_ref_quat_int.h
g1g2
float g1g2[INDI_OUTPUTS][INDI_NUM_ACT]
Definition: stabilization_indi.c:179
stabilization_indi_init
void stabilization_indi_init(void)
Function that initializes important values upon engaging INDI.
Definition: stabilization_indi.c:225
stabilization_attitude_common_int.h
actuator_state_filt_vect
float actuator_state_filt_vect[INDI_NUM_ACT]
Definition: stabilization_indi.c:131
stab_att_sp_euler
struct Int32Eulers stab_att_sp_euler
with INT32_ANGLE_FRAC
Definition: stabilization_attitude_euler_float.c:45
Indi_gains::rate
struct FloatRates rate
Definition: stabilization_indi.h:43
stab_att_sp_quat
struct Int32Quat stab_att_sp_quat
with INT32_QUAT_FRAC
Definition: stabilization_attitude_heli_indi.c:127
Int32Vect2
Definition: pprz_algebra_int.h:83
Int32Eulers
euler angles
Definition: pprz_algebra_int.h:146
stabilization_indi_set_rpy_setpoint_i
void stabilization_indi_set_rpy_setpoint_i(struct Int32Eulers *rpy)
Set attitude quaternion setpoint from rpy.
Definition: stabilization_indi.c:335
indi_gains
struct Indi_gains indi_gains
Definition: stabilization_indi.c:84
stabilization_indi_rate_run
void stabilization_indi_rate_run(struct FloatRates rate_ref, bool in_flight)
Does the INDI calculations.
Definition: stabilization_indi.c:373
int32_t
int int32_t
Typedef defining 32 bit int type.
Definition: vl53l1_types.h:83
stabilization_indi_set_failsafe_setpoint
void stabilization_indi_set_failsafe_setpoint(void)
Function that calculates the failsafe setpoint.
Definition: stabilization_indi.c:320
Bwls
float * Bwls[INDI_OUTPUTS]
Definition: stabilization_indi.c:73
stabilization_indi_attitude_run
void stabilization_indi_attitude_run(struct Int32Quat quat_sp, bool in_flight)
runs stabilization indi
Definition: stabilization_indi.c:546
stabilization_indi_enter
void stabilization_indi_enter(void)
Function that resets important values upon engaging INDI.
Definition: stabilization_indi.c:275
Indi_gains
Definition: stabilization_indi.h:41
Indi_gains::att
struct FloatRates att
Definition: stabilization_indi.h:42
FloatRates
angular rates
Definition: pprz_algebra_float.h:93
heading
float heading
Definition: wedgebug.c:258