Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
guidance_hybrid.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Ewoud Smeur <e.j.j.smeur@tudelft.nl>
3  * This is code for guidance of hybrid UAVs. It needs a simple velocity
4  * model to control the ground velocity of the UAV while estimating the
5  * wind velocity.
6  *
7  * This file is part of paparazzi.
8  *
9  * paparazzi is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2, or (at your option)
12  * any later version.
13  *
14  * paparazzi is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with paparazzi; see the file COPYING. If not, write to
21  * the Free Software Foundation, 59 Temple Place - Suite 330,
22  * Boston, MA 02111-1307, USA.
23  */
24 
30 #ifndef GUIDANCE_HYBRID_H
31 #define GUIDANCE_HYBRID_H
32 
33 #include "math/pprz_algebra_int.h"
36 
38 extern int32_t max_airspeed;
39 extern int32_t wind_gain;
41 extern float max_turn_bank;
42 extern float turn_bank_gain;
43 
46 extern float fwd_alt_thrust_gain;
47 extern float fwd_pid_div;
48 extern float fwd_nominal_pitch;
49 extern float fwd_pitch_gain;
50 extern int32_t hover_p_gain;
51 
55 extern void guidance_hybrid_init(void);
56 
59 extern struct StabilizationSetpoint guidance_hybrid_run(void);
60 
61 extern struct StabilizationSetpoint guidance_hybrid_h_run_pos(bool in_flight, struct HorizontalGuidance *gh);
62 extern struct StabilizationSetpoint guidance_hybrid_h_run_speed(bool in_flight, struct HorizontalGuidance *gh);
63 extern struct StabilizationSetpoint guidance_hybrid_h_run_accel(bool in_flight, struct HorizontalGuidance *gh);
64 extern int32_t guidance_hybrid_v_run_pos(bool in_flight, struct VerticalGuidance *gv);
65 extern int32_t guidance_hybrid_v_run_speed(bool in_flight, struct VerticalGuidance *gv);
66 extern int32_t guidance_hybrid_v_run_accel(bool in_flight, struct VerticalGuidance *gv);
67 
71 extern struct StabilizationSetpoint guidance_hybrid_set_cmd_i(struct Int32Eulers *sp_cmd);
72 
76 extern void guidance_hybrid_airspeed_to_attitude(struct Int32Eulers *ypr_sp);
77 
81 
85 
89 extern void guidance_hybrid_reset_heading(struct Int32Eulers *sp_cmd);
90 
97 
98 extern bool force_forward_flight;
99 
100 #endif /* GUIDANCE_HYBRID_H */
euler angles
float fwd_pitch_gain
int32_t guidance_hybrid_norm_ref_airspeed
struct StabilizationSetpoint guidance_hybrid_h_run_pos(bool in_flight, struct HorizontalGuidance *gh)
float fwd_alt_thrust_gain
struct StabilizationSetpoint guidance_hybrid_h_run_accel(bool in_flight, struct HorizontalGuidance *gh)
int32_t guidance_hybrid_v_run_speed(bool in_flight, struct VerticalGuidance *gv)
float fwd_pid_div
float turn_bank_gain
struct StabilizationSetpoint guidance_hybrid_run(void)
Runs the Hybrid Guidance main functions.
struct StabilizationSetpoint guidance_hybrid_h_run_speed(bool in_flight, struct HorizontalGuidance *gh)
int32_t guidance_hybrid_v_run_pos(bool in_flight, struct VerticalGuidance *gv)
void guidance_hybrid_determine_wind_estimate(void)
Description.
int32_t max_airspeed
int32_t hover_p_gain
int32_t fwd_speed_p_gain
float fwd_nominal_pitch
void guidance_hybrid_groundspeed_to_airspeed(void)
Description.
void guidance_hybrid_airspeed_to_attitude(struct Int32Eulers *ypr_sp)
Convert a required airspeed to a certain attitude for the Hybrid.
int32_t guidance_hybrid_vertical(int32_t delta_t)
Description.
int32_t horizontal_speed_gain
int32_t wind_gain
int32_t cruise_throttle
struct StabilizationSetpoint guidance_hybrid_set_cmd_i(struct Int32Eulers *sp_cmd)
Creates the attitude set-points from an orientation vector.
float max_turn_bank
int32_t guidance_hybrid_v_run_accel(bool in_flight, struct VerticalGuidance *gv)
void guidance_hybrid_reset_heading(struct Int32Eulers *sp_cmd)
Description.
void guidance_hybrid_init(void)
Hybrid Guidance Initialization function.
bool force_forward_flight
Paparazzi fixed point algebra.
General stabilization interface for rotorcrafts.
Stabilization setpoint.
Definition: stabilization.h:42
int int32_t
Typedef defining 32 bit int type.
Definition: vl53l1_types.h:83