Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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_ */
struct opticflow_stab_t opticflow_stab
void guidance_h_module_read_rc(void)
Read the RC commands.
float err_vx_int
The integrated velocity error in x direction (m/s)
float desired_vx
The desired velocity in the x direction (cm/s)
int32_t phi_pgain
The roll P gain on the err_vx.
int32_t theta_pgain
The pitch P gain on the err_vy.
void guidance_h_module_enter(void)
Horizontal guidance mode enter resets the errors and starts the controller.
int32_t theta_igain
The pitch I gain on the err_vy_int.
euler angles
struct Int32Eulers cmd
The commands that are send to the hover loop.
int32_t phi_igain
The roll I gain on the err_vx_int.
signed long int32_t
Definition: types.h:19
void guidance_h_module_run(bool in_flight)
Main guidance loop.
float desired_vy
The desired velocity in the y direction (cm/s)
void guidance_h_module_init(void)
Initialization of horizontal guidance module.
float err_vy_int
The integrated velocity error in y direction (m/s)
Paparazzi fixed point algebra.