Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
optical_flow_hover.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018
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, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef OPTICAL_FLOW_HOVER_H_
22 #define OPTICAL_FLOW_HOVER_H_
23 
24 #include "std.h"
25 // Without optitrack set to: GUIDANCE_V/H_MODE_ATTITUDE
26 // With optitrack set to: GUIDANCE_V/H_MODE_NAV
27 // To use the Optical Flow Hover module use GUIDANCE_V/H_MODE_MODULE
28 
29 #define GUIDANCE_H_MODE_MODULE_SETTING GUIDANCE_H_MODE_MODULE
30 // #define GUIDANCE_H_MODE_MODULE_SETTING GUIDANCE_H_MODE_NAV
31 
32 #define GUIDANCE_V_MODE_MODULE_SETTING GUIDANCE_V_MODE_MODULE
33 //#define GUIDANCE_V_MODE_MODULE_SETTING GUIDANCE_V_MODE_NAV
34 
35 extern bool oscphi;
36 extern bool osctheta;
37 extern bool derotated;
38 extern bool cov_method;
39 extern uint8_t hover_method;
40 
44 
45 // The module functions
46 extern void optical_flow_hover_init(void);
47 
48 // Vertical loops
49 extern void guidance_v_module_init(void);
50 extern void guidance_v_module_enter(void);
51 extern void guidance_v_module_run(bool in_flight);
52 
53 // Horizontal loops
54 extern void guidance_h_module_init(void);
55 extern void guidance_h_module_enter(void);
56 extern void guidance_h_module_run(bool in_flight);
57 extern void guidance_h_module_read_rc(void);
58 
59 #endif /* OPTICAL_FLOW_LANDING_H_ */
oscphi
bool oscphi
Definition: optical_flow_hover.c:210
guidance_h_module_read_rc
void guidance_h_module_read_rc(void)
Read the RC commands.
Definition: ctrl_module_innerloop_demo.c:90
guidance_v_module_init
void guidance_v_module_init(void)
Definition: ctrl_module_innerloop_demo.c:105
guidance_h_module_init
void guidance_h_module_init(void)
Initialization of horizontal guidance module.
Definition: ctrl_module_innerloop_demo.c:80
optical_flow_hover_init
void optical_flow_hover_init(void)
Definition: optical_flow_hover.c:259
derotated
bool derotated
Definition: optical_flow_hover.c:212
cov_method
bool cov_method
method to calculate the covariance: between thrust and div / angle and flow (0) or div and div past /...
Definition: optical_flow_hover.c:213
std.h
of_hover_ctrl_X
struct OpticalFlowHoverControl of_hover_ctrl_X
Definition: optical_flow_hover.c:205
guidance_v_module_run
void guidance_v_module_run(bool in_flight)
Definition: optical_flow_hover.c:656
hover_method
uint8_t hover_method
Method used to hover 0 = All axis after each other; 1 = all axis at the same time; 2 = vertical only,...
Definition: optical_flow_hover.c:214
of_hover_ctrl_Y
struct OpticalFlowHoverControl of_hover_ctrl_Y
Definition: optical_flow_hover.c:206
uint8_t
unsigned char uint8_t
Definition: types.h:14
of_hover_ctrl_Z
struct OpticalFlowHoverControl of_hover_ctrl_Z
Definition: optical_flow_hover.c:207
guidance_v_module_enter
void guidance_v_module_enter(void)
Entering the vertical module (user switched to module)
Definition: ctrl_module_innerloop_demo.c:111
OpticalFlowHoverControl
Definition: optical_flow_functions.h:43
osctheta
bool osctheta
Definition: optical_flow_hover.c:211
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
guidance_h_module_run
void guidance_h_module_run(bool in_flight)
Main guidance loop.
Definition: ctrl_module_innerloop_demo.c:99