Paparazzi UAS v7.0_unstable
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
63extern "C" {
64#endif
65
70
79typedef struct {
80 float w;
81 float delta_T;
83 float k_roll;
84 float k_climb;
85 float k_psi;
86 float L;
87 float beta;
89
91
92// Parameters for the trajectories
100
101typedef struct {
103 float p_parametric[16];
104 float phi_errors[3];
106
108
109// Bezier struct
111
112// Init function
113extern void gvf_parametric_init(void);
114
115// Control functions
117extern void gvf_parametric_control_2D(float, float, float, float, float, float, float, float);
118extern void gvf_parametric_control_3D(float, float, float, float, float, float, float, float, float,
119 float, float, float);
120
121// 2D Trefoil
122extern bool gvf_parametric_2D_trefoil_XY(float, float, float, float, float, float, float);
123extern bool gvf_parametric_2D_trefoil_wp(uint8_t, float, float, float, float, float);
124
125// 2D BEZIER
127extern bool gvf_parametric_2D_bezier_XY(void);
128
129// 3D Ellipse
130extern bool gvf_parametric_3D_ellipse_XYZ(float, float, float, float, float, float);
131extern bool gvf_parametric_3D_ellipse_wp(uint8_t, float, float, float, float);
132extern bool gvf_parametric_3D_ellipse_wp_delta(uint8_t, float, float, float, float);
133
134// 3D Lissajous
135extern bool gvf_parametric_3D_lissajous_XYZ(float, float, float, float, float, float, float, float, float, float, float,
136 float, float);
137extern bool gvf_parametric_3D_lissajous_wp_center(uint8_t, float, float, float, float, float, float, float, float,
138 float, float, float);
139
140#ifdef __cplusplus
141}
142#endif
143
144
145#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
@ BEZIER_2D
@ TREFOIL_2D
@ ELLIPSE_3D
bool gvf_parametric_3D_ellipse_XYZ(float, float, float, float, float, float)
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_2D_bezier_XY(void)
bezier_t gvf_bezier_2D[GVF_PARAMETRIC_2D_BEZIER_N_SEG]
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
enum trajectories_parametric type
void gvf_parametric_set_direction(int8_t s)
bool gvf_parametric_3D_ellipse_wp(uint8_t, float, float, float, float)
bool gvf_parametric_2D_bezier_wp(uint8_t)
#define GVF_PARAMETRIC_2D_BEZIER_N_SEG
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.
signed char int8_t
Typedef defining 8 bit char type.