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 #include "math/wls/wls_alloc.h"
55 extern struct WLS_t wls_guid_p;
56 extern void guidance_indi_hybrid_set_wls_settings(float body_v[3], float roll_angle, float pitch_angle);
57 #endif
58 
63 };
64 
69 };
70 
71 extern struct StabilizationSetpoint guidance_indi_run(struct FloatVect3 *accep_sp, float heading_sp);
72 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);
73 extern void guidance_set_min_max_airspeed(float min_airspeed, float max_airspeed);
74 
76  float pos_gain;
77  float pos_gainz;
78  float speed_gain;
79  float speed_gainz;
81  float liftd_asq;
82  float liftd_p80;
83  float liftd_p50;
84  float min_airspeed;
85  float max_airspeed;
91 };
92 
93 extern struct FloatVect3 sp_accel;
94 extern struct FloatVect3 gi_speed_sp;
96 
97 extern float guidance_indi_pitch_pref_deg;
98 
99 extern float gi_unbounded_airspeed_sp;
100 
101 extern float guidance_indi_thrust_z_eff;
102 
104 extern bool take_heading_control;
105 extern float guidance_indi_max_bank;
106 extern float guidance_indi_min_pitch;
107 extern bool force_forward;
109 extern bool coordinated_turn_use_accel;
110 
111 #endif /* GUIDANCE_INDI_HYBRID_H */
int32_t max_airspeed
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
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:74
float guidance_indi_pitch_pref_deg
void guidance_indi_enter(void)
Call upon entering indi guidance.
bool take_heading_control
void guidance_set_min_max_airspeed(float min_airspeed, float max_airspeed)
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 gi_unbounded_airspeed_sp
bool coordinated_turn_use_accel
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:53