Paparazzi UAS  v6.2.0_stable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gvf_parametric.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Hector Garcia de Marina <hgarciad@ucm.es>
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 
27 #ifndef GVF_PARAMETRIC_H
28 #define GVF_PARAMETRIC_H
29 
30 #define GVF_PARAMETRIC_GRAVITY 9.806
31 
33 #ifndef GVF_PARAMETRIC_CONTROL_KROLL
34 #define GVF_PARAMETRIC_CONTROL_KROLL 1
35 #endif
36 
38 #ifndef GVF_PARAMETRIC_CONTROL_KCLIMB
39 #define GVF_PARAMETRIC_CONTROL_KCLIMB 1
40 #endif
41 
43 #ifndef GVF_PARAMETRIC_CONTROL_L
44 #define GVF_PARAMETRIC_CONTROL_L 0.1
45 #endif
46 
48 #ifndef GVF_PARAMETRIC_CONTROL_BETA
49 #define GVF_PARAMETRIC_CONTROL_BETA 0.01
50 #endif
51 
53 #ifndef GVF_PARAMETRIC_CONTROL_KPSI
54 #define GVF_PARAMETRIC_CONTROL_KPSI 1
55 #endif
56 
58 #ifndef GVF_OCAML_GCS
59 #define GVF_OCAML_GCS true
60 #endif
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
69 
78 typedef struct {
79  float w;
80  float delta_T;
82  float k_roll;
83  float k_climb;
84  float k_psi;
85  float L;
86  float beta;
88 
90 
91 // Parameters for the trajectories
97 };
98 
99 typedef struct {
100  enum trajectories_parametric type;
101  float p_parametric[16];
102  float phi_errors[3];
104 
106 
107 // Init function
108 extern void gvf_parametric_init(void);
109 
110 // Control functions
112 extern void gvf_parametric_control_2D(float, float, float, float, float, float, float, float);
113 extern void gvf_parametric_control_3D(float, float, float, float, float, float, float, float, float,
114  float, float, float);
115 
116 // 2D Trefoil
117 extern bool gvf_parametric_2D_trefoil_XY(float, float, float, float, float, float, float);
118 extern bool gvf_parametric_2D_trefoil_wp(uint8_t, float, float, float, float, float);
119 
120 // 3D Ellipse
121 extern bool gvf_parametric_3D_ellipse_XYZ(float, float, float, float, float, float);
122 extern bool gvf_parametric_3D_ellipse_wp(uint8_t, float, float, float, float);
123 extern bool gvf_parametric_3D_ellipse_wp_delta(uint8_t, float, float, float, float);
124 
125 // 3D Lissajous
126 extern bool gvf_parametric_3D_lissajous_XYZ(float, float, float, float, float, float, float, float, float, float, float,
127  float, float);
128 extern bool gvf_parametric_3D_lissajous_wp_center(uint8_t, float, float, float, float, float, float, float, float,
129  float, float, float);
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 
136 #endif // GVF_PARAMETRIC_H
gvf_parametric_con gvf_parametric_control
void gvf_parametric_control_3D(float, float, float, float, float, float, float, float, float, float, float, float)
void gvf_parametric_control_2D(float, float, float, float, float, float, float, float)
trajectories_parametric
@ NONE_PARAMETRIC
@ LISSAJOUS_3D
@ TREFOIL_2D
@ ELLIPSE_3D
bool gvf_parametric_3D_ellipse_XYZ(float, float, float, float, float, float)
3D TRAJECTORIES
bool gvf_parametric_2D_trefoil_wp(uint8_t, float, float, float, float, float)
bool gvf_parametric_2D_trefoil_XY(float, float, float, float, float, float, float)
2D TRAJECTORIES
bool gvf_parametric_3D_lissajous_XYZ(float, float, float, float, float, float, float, float, float, float, float, float, float)
bool gvf_parametric_3D_ellipse_wp_delta(uint8_t, float, float, float, float)
bool gvf_parametric_3D_lissajous_wp_center(uint8_t, float, float, float, float, float, float, float, float, float, float, float)
void gvf_parametric_init(void)
gvf_parametric_tra gvf_parametric_trajectory
void gvf_parametric_set_direction(int8_t s)
bool gvf_parametric_3D_ellipse_wp(uint8_t, float, float, float, float)
Guiding vector field algorithm for 2D and 3D complex trajectories.
Guiding vector field algorithm for 2D and 3D complex trajectories.
Guiding vector field algorithm for 2D and 3D complex trajectories.
static uint32_t s
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98
signed char int8_t
Typedef defining 8 bit char type.
Definition: vl53l1_types.h:103