Paparazzi UAS  v5.17_devel-10-ge0a23a5
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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_ */
uint8_t hover_method
Method used to hover 0 = All axis after each other; 1 = all axis at the same time; 2 = vertical only...
void guidance_v_module_run(bool in_flight)
struct OpticalFlowHoverControl of_hover_ctrl_Z
void guidance_h_module_init(void)
Initialization of horizontal guidance module.
struct OpticalFlowHoverControl of_hover_ctrl_X
void guidance_v_module_enter(void)
Entering the vertical module (user switched to module)
void optical_flow_hover_init(void)
void guidance_h_module_run(bool in_flight)
Main guidance loop.
void guidance_h_module_read_rc(void)
Read the RC commands.
bool osctheta
bool cov_method
method to calculate the covariance: between thrust and div / angle and flow (0) or div and div past /...
void guidance_h_module_enter(void)
Entering the horizontal module (user switched to module)
unsigned char uint8_t
Definition: types.h:14
struct OpticalFlowHoverControl of_hover_ctrl_Y
void guidance_v_module_init(void)
bool derotated
bool oscphi