Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
nav_parametric_2d_trefoil.c
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
29
31#ifndef GVF_PARAMETRIC_2D_TREFOIL_KX
32 #if GVF_PARAMETRIC_CONTROL_STEP_ADAPTATION > 0
33 #define GVF_PARAMETRIC_2D_TREFOIL_KX 0.1
34 #else
35 #define GVF_PARAMETRIC_2D_TREFOIL_KX 0.001
36 #endif
37#endif
38
40#ifndef GVF_PARAMETRIC_2D_TREFOIL_KY
41 #if GVF_PARAMETRIC_CONTROL_STEP_ADAPTATION > 0
42 #define GVF_PARAMETRIC_2D_TREFOIL_KY 0.1
43 #else
44 #define GVF_PARAMETRIC_2D_TREFOIL_KY 0.001
45 #endif
46#endif
47
49#ifndef GVF_PARAMETRIC_2D_TREFOIL_W1
50 #define GVF_PARAMETRIC_2D_TREFOIL_W1 0.02
51#endif
52
54#ifndef GVF_PARAMETRIC_2D_TREFOIL_W2
55 #define GVF_PARAMETRIC_2D_TREFOIL_W2 0.03
56#endif
57
59#ifndef GVF_PARAMETRIC_2D_TREFOIL_RATIO
60 #define GVF_PARAMETRIC_2D_TREFOIL_RATIO 160
61#endif
62
64#ifndef GVF_PARAMETRIC_2D_TREFOIL_R
65 #define GVF_PARAMETRIC_2D_TREFOIL_R 80
66#endif
67
69#ifndef GVF_PARAMETRIC_2D_TREFOIL_ALPHA
70 #define GVF_PARAMETRIC_2D_TREFOIL_ALPHA 0
71#endif
72
79
81
84// 2D TREFOIL KNOT
85
108
109bool nav_gvf_parametric_2D_trefoil_wp(uint8_t wp, float w1, float w2, float ratio, float r, float alpha)
110{
113 nav_gvf_parametric_2D_trefoil_XY(WaypointX(wp), WaypointY(wp), w1, w2, ratio, r, alpha);
114 return true;
115}
116
#define WaypointX(_wp)
Definition common_nav.h:45
#define WaypointY(_wp)
Definition common_nav.h:46
void gvf_parametric_2d_trefoil_info(float *f1, float *f2, float *f1d, float *f2d, float *f1dd, float *f2dd, float wb)
gvf_parametric_tra gvf_parametric_trajectory
@ TREFOIL_2D
enum trajectories_parametric type
gvf_parametric_con gvf_parametric_control
void gvf_parametric_control_2D(float kx, float ky, float f1, float f2, float f1d, float f2d, float f1dd, float f2dd)
Guiding vector field algorithm for 2D and 3D parametric trajectories.
uint16_t foo
Definition main_demo5.c:58
#define GVF_PARAMETRIC_2D_TREFOIL_ALPHA
static int gvf_parametric_p_len_wps
bool nav_gvf_parametric_2D_trefoil_XY(float xo, float yo, float w1, float w2, float ratio, float r, float alpha)
#define GVF_PARAMETRIC_2D_TREFOIL_KY
gvf_par_2d_tre_par gvf_parametric_2d_trefoil_par
#define GVF_PARAMETRIC_2D_TREFOIL_R
#define GVF_PARAMETRIC_2D_TREFOIL_KX
Guiding vector field algorithm for 2D and 3D complex trajectories.
#define GVF_PARAMETRIC_2D_TREFOIL_W2
#define GVF_PARAMETRIC_2D_TREFOIL_RATIO
bool nav_gvf_parametric_2D_trefoil_wp(uint8_t wp, float w1, float w2, float ratio, float r, float alpha)
#define GVF_PARAMETRIC_2D_TREFOIL_W1
float alpha
Definition textons.c:133
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.