Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
guidance_indi_hybrid.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Ewoud Smeur <ewoud.smeur@gmail.com>
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 
30 #ifndef GUIDANCE_INDI_HYBRID_H
31 #define GUIDANCE_INDI_HYBRID_H
32 
33 #include "std.h"
34 #include "math/pprz_algebra_int.h"
39 
40 
41 #ifndef GUIDANCE_INDI_HYBRID_U
42 #error Please use guidance_indi_hybrid_tailsitter or guidance_indi_hybrid_quadplane in your airframe file.
43 #endif
44 
45 
46 // TODO change names for _indi_hybrid_
47 
48 extern void guidance_indi_init(void);
49 extern void guidance_indi_enter(void);
50 extern float guidance_indi_get_liftd(float pitch, float theta);
51 extern void guidance_indi_calcg_wing(float Gmat[GUIDANCE_INDI_HYBRID_V][GUIDANCE_INDI_HYBRID_U], struct FloatVect3 a_diff, float v_body[GUIDANCE_INDI_HYBRID_V]);
52 
53 #if GUIDANCE_INDI_HYBRID_USE_WLS
54 extern void guidance_indi_hybrid_set_wls_settings(float body_v[3], float roll_angle, float pitch_angle);
55 #endif
56 
61 };
62 
67 };
68 
69 extern struct StabilizationSetpoint guidance_indi_run(struct FloatVect3 *accep_sp, float heading_sp);
70 extern struct StabilizationSetpoint guidance_indi_run_mode(bool in_flight, struct HorizontalGuidance *gh, struct VerticalGuidance *gv, enum GuidanceIndiHybrid_HMode h_mode, enum GuidanceIndiHybrid_VMode v_mode);
71 
73  float pos_gain;
74  float pos_gainz;
75  float speed_gain;
76  float speed_gainz;
78  float liftd_asq;
79  float liftd_p80;
80  float liftd_p50;
81 };
82 
83 extern struct FloatVect3 sp_accel;
84 extern struct FloatVect3 gi_speed_sp;
85 
86 extern float guidance_indi_pitch_pref_deg;
87 
88 #if GUIDANCE_INDI_HYBRID_USE_WLS
89 extern float Wu_gih[GUIDANCE_INDI_HYBRID_U];
90 extern float Wv_gih[GUIDANCE_INDI_HYBRID_V];
91 extern float du_min_gih[GUIDANCE_INDI_HYBRID_U];
92 extern float du_max_gih[GUIDANCE_INDI_HYBRID_U];
93 extern float du_pref_gih[GUIDANCE_INDI_HYBRID_U];
94 #endif
95 
96 extern float guidance_indi_thrust_z_eff;
97 extern float guidance_indi_thrust_x_eff;
98 
101 extern float guidance_indi_max_airspeed;
102 extern bool take_heading_control;
103 extern float guidance_indi_max_bank;
104 extern float guidance_indi_min_pitch;
105 extern bool force_forward;
107 
108 #endif /* GUIDANCE_INDI_HYBRID_H */
void guidance_indi_calcg_wing(float Gmat[GUIDANCE_INDI_HYBRID_V][GUIDANCE_INDI_HYBRID_U], struct FloatVect3 a_diff, float v_body[GUIDANCE_INDI_HYBRID_V])
Perform WLS.
bool force_forward
forward flight for hybrid nav
float guidance_indi_thrust_z_eff
float guidance_indi_get_liftd(float pitch, float theta)
struct guidance_indi_hybrid_params gih_params
struct FloatVect3 gi_speed_sp
float guidance_indi_min_pitch
float guidance_indi_max_bank
GuidanceIndiHybrid_VMode
@ GUIDANCE_INDI_HYBRID_V_POS
@ GUIDANCE_INDI_HYBRID_V_SPEED
@ GUIDANCE_INDI_HYBRID_V_ACCEL
float guidance_indi_thrust_x_eff
struct StabilizationSetpoint guidance_indi_run_mode(bool in_flight, struct HorizontalGuidance *gh, struct VerticalGuidance *gv, enum GuidanceIndiHybrid_HMode h_mode, enum GuidanceIndiHybrid_VMode v_mode)
struct FloatVect3 sp_accel
Definition: guidance_indi.c:78
float guidance_indi_pitch_pref_deg
void guidance_indi_enter(void)
Call upon entering indi guidance.
bool take_heading_control
void guidance_indi_init(void)
Init function.
GuidanceIndiHybrid_HMode
@ GUIDANCE_INDI_HYBRID_H_SPEED
@ GUIDANCE_INDI_HYBRID_H_ACCEL
@ GUIDANCE_INDI_HYBRID_H_POS
float guidance_indi_specific_force_gain
float guidance_indi_max_airspeed
bool guidance_indi_airspeed_filtering
struct StabilizationSetpoint guidance_indi_run(struct FloatVect3 *accep_sp, float heading_sp)
void WEAK guidance_indi_hybrid_set_wls_settings(float body_v[3], float roll_angle, float pitch_angle)
Simple high pass filter with double precision.
Paparazzi floating point algebra.
Paparazzi fixed point algebra.
General stabilization interface for rotorcrafts.
Stabilization setpoint.
Definition: stabilization.h:42