Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
guidance_opticflow_hover.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Hann Woei Ho
3  * 2015 Freek van Tienen <freek.v.tienen@gmail.com>
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, see
19  * <http://www.gnu.org/licenses/>.
20  */
21 
30 #ifndef GUIDANCE_OPTICFLOW_HOVER_H_
31 #define GUIDANCE_OPTICFLOW_HOVER_H_
32 
33 #include "std.h"
34 #include "math/pprz_algebra_int.h"
35 
36 /* The opticflow stabilization */
42  float desired_vx;
43  float desired_vy;
44 
45  float err_vx_int;
46  float err_vy_int;
47  struct Int32Eulers cmd;
48 };
49 extern struct opticflow_stab_t opticflow_stab;
50 
51 // Implement own Horizontal loops
52 extern void guidance_h_module_init(void);
53 extern void guidance_h_module_enter(void);
54 extern void guidance_h_module_read_rc(void);
55 extern void guidance_h_module_run(bool in_flight);
56 
57 #endif /* GUIDANCE_OPTICFLOW_HOVER_H_ */
opticflow_stab_t::phi_pgain
int32_t phi_pgain
The roll P gain on the err_vx.
Definition: guidance_opticflow_hover.h:38
guidance_h_module_enter
void guidance_h_module_enter(void)
Entering the horizontal module (user switched to module)
Definition: ctrl_module_innerloop_demo.c:85
opticflow_stab
struct opticflow_stab_t opticflow_stab
Definition: guidance_opticflow_hover.c:90
opticflow_stab_t::desired_vx
float desired_vx
The desired velocity in the x direction (cm/s)
Definition: guidance_opticflow_hover.h:42
opticflow_stab_t::theta_igain
int32_t theta_igain
The pitch I gain on the err_vy_int.
Definition: guidance_opticflow_hover.h:41
pprz_algebra_int.h
Paparazzi fixed point algebra.
opticflow_stab_t::err_vx_int
float err_vx_int
The integrated velocity error in x direction (m/s)
Definition: guidance_opticflow_hover.h:45
opticflow_stab_t::desired_vy
float desired_vy
The desired velocity in the y direction (cm/s)
Definition: guidance_opticflow_hover.h:43
std.h
guidance_h_module_run
void guidance_h_module_run(bool in_flight)
Main guidance loop.
Definition: ctrl_module_innerloop_demo.c:99
Int32Eulers
euler angles
Definition: pprz_algebra_int.h:146
opticflow_stab_t::theta_pgain
int32_t theta_pgain
The pitch P gain on the err_vy.
Definition: guidance_opticflow_hover.h:40
int32_t
int int32_t
Typedef defining 32 bit int type.
Definition: vl53l1_types.h:83
opticflow_stab_t::cmd
struct Int32Eulers cmd
The commands that are send to the hover loop.
Definition: guidance_opticflow_hover.h:47
guidance_h_module_init
void guidance_h_module_init(void)
Initialization of horizontal guidance module.
Definition: ctrl_module_innerloop_demo.c:80
guidance_h_module_read_rc
void guidance_h_module_read_rc(void)
Read the RC commands.
Definition: ctrl_module_innerloop_demo.c:90
opticflow_stab_t::phi_igain
int32_t phi_igain
The roll I gain on the err_vx_int.
Definition: guidance_opticflow_hover.h:39
opticflow_stab_t::err_vy_int
float err_vy_int
The integrated velocity error in y direction (m/s)
Definition: guidance_opticflow_hover.h:46
opticflow_stab_t
Definition: guidance_opticflow_hover.h:37