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_2d_bezier_splines.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 Alfredo Gonzalez Calvin <alfredgo@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
21#ifndef GVF_PARAMETRIC_2D_BEZIER_SPLINES_H
22#define GVF_PARAMETRIC_2D_BEZIER_SPLINES_H
23
24
25// Define only one segment by default
26#ifndef GVF_PARAMETRIC_2D_BEZIER_N_SEG
27#define GVF_PARAMETRIC_2D_BEZIER_N_SEG 1
28#endif
29
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36typedef struct {
37 float kx;
38 float ky;
40
41
42// Cubic bezier
43typedef struct {
44 float p0[2];
45 float p1[2];
46 float p2[2];
47 float p3[2];
48} bezier_t;
49
50
52
53extern void create_bezier_spline(bezier_t *bezier, float *px, float *py);
54extern void gvf_parametric_2d_bezier_splines_info(bezier_t *bezier, float *f1, float *f2, float *f1d, float *f2d,
55 float *f1dd, float *f2dd);
56
57#ifdef __cplusplus
58}
59#endif
60
61
62
63
64
65#endif // bezier splines
void gvf_parametric_2d_bezier_splines_info(bezier_t *bezier, float *f1, float *f2, float *f1d, float *f2d, float *f1dd, float *f2dd)
gvf_par_2d_bezier_par gvf_parametric_2d_bezier_par
void create_bezier_spline(bezier_t *bezier, float *px, float *py)
uint16_t foo
Definition main_demo5.c:58