Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
guidance_OA.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Roland + Clint
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, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  */
22 
26 #ifndef GUIDANCE_OA
27 #define GUIDANCE_OA
28 
29 #include "std.h"
31 //#include "inter_thread_data.h"
32 #include "math/pprz_algebra_int.h"
33 
34 /* The opticflow stabilization */
35 struct opticflow_stab_t {
40  float desired_vx;
41  float desired_vy;
42 
43  float err_vx_int;
44  float err_vy_int;
45  struct Int32Eulers cmd;
46 };
47 extern struct opticflow_stab_t opticflow_stab;
48 
49 extern int8_t filter_flag;
51 
53 extern oa_method OA_method_flag; //0 =>No OA only opticflow 1=pingpong 2=>pot_heading 3=>pot_vel 4=>vector 5=>safetyzone
54 
55 extern int8_t opti_speed_flag;
56 extern float vref_max;
57 
58 //variables form optic flow module
59 extern float ref_pitch;
60 extern float ref_roll;
61 extern float r_dot_new;
62 extern float speed_pot;
63 
64 // Implement own Horizontal loops
65 extern void guidance_module_enter(void);
66 extern void guidance_module_run(bool in_flight);
67 
68 // Update the stabilization commands based on a vision result
69 extern void OA_update(void);
70 
71 #endif
euler angles
float err_vx_int
The integrated velocity error in x direction (m/s)
int8_t filter_flag
Definition: guidance_OA.c:93
struct opticflow_stab_t opticflow_stab
float r_dot_new
Definition: guidance_OA.c:107
struct Int32Eulers cmd
The commands that are send to the hover loop.
float err_vy_int
The integrated velocity error in y direction (m/s)
int32_t theta_pgain
The pitch P gain on the err_vy.
int32_t theta_igain
The pitch I gain on the err_vy_int.
oa_method
Definition: guidance_OA.h:52
@ SAFETYZONE
Definition: guidance_OA.h:52
@ VECTOR
Definition: guidance_OA.h:52
@ LOGICBASED
Definition: guidance_OA.h:52
@ PINGPONG
Definition: guidance_OA.h:52
@ POT_VEL
Definition: guidance_OA.h:52
@ POT_HEADING
Definition: guidance_OA.h:52
@ NO_OBSTACLE_AVOIDANCE
Definition: guidance_OA.h:52
float vref_max
Definition: guidance_OA.c:99
float desired_vy
The desired velocity in the y direction (cm/s)
float speed_pot
Definition: guidance_OA.c:110
oa_method OA_method_flag
Definition: guidance_OA.c:96
float ref_pitch
Definition: guidance_OA.c:103
void guidance_module_enter(void)
Entering the module (user switched to module)
int8_t repulsionforce_filter_flag
Definition: guidance_OA.c:94
void guidance_module_run(bool in_flight)
Main guidance loop.
int8_t opti_speed_flag
Definition: guidance_OA.c:98
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 phi_igain
The roll I gain on the err_vx_int.
void OA_update(void)
Update the controls based on a vision result.
Definition: guidance_OA.c:177
float ref_roll
Definition: guidance_OA.c:104
Paparazzi fixed point algebra.
Capture images from a V4L2 device (Video for Linux 2)
int int32_t
Typedef defining 32 bit int type.
Definition: vl53l1_types.h:83
signed char int8_t
Typedef defining 8 bit char type.
Definition: vl53l1_types.h:103