Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
pprz_circfit_float.h
Go to the documentation of this file.
1/*
2 * This file is part of paparazzi
3 *
4 * paparazzi is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
7 * any later version.
8 *
9 * paparazzi is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with paparazzi; see the file COPYING. If not, see
16 * <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef PPRZ_CIRCFIT_FLOAT_H
20#define PPRZ_CIRCFIT_FLOAT_H
21
22#include <std.h>
23
25 CIRC_FIT_OK = 0, // Circle fit successful
26 CIRC_FIT_ERROR = -1, // Circle fit failed
27 CIRC_FIT_ITERATION_LIMIT = -2, // Circle fit reached iteration limit
28 CIRC_FIT_NORM_ERROR = -3, // Circle fit norm error
29};
30
31struct circle_t {
32 float x; // x coordinate of the circle center
33 float y; // y coordinate of the circle center
34 float r; // radius of the circle
35};
36
37/*
38 * Fitting Noisy Data to a Circle: A Simple Iterative Maximum Likelihood Approach
39 * Wei Li, et al.
40 * DOI: 10.1109/icc.2011.5963101
41 *
42 * inputs:
43 * c: struct to store the fitted circle
44 * x: x coordinates used during fitting
45 * y: y coordinates used during fitting
46 * n: number of points
47 * g: initial guess for the circle (NULL for no initial guess)
48 */
49enum CircFitStatus_t pprz_circfit_wei_float(struct circle_t *c, const float *x, const float *y, uint16_t n, struct circle_t *g);
50
51
52#endif // PPRZ_CIRCFIT_FLOAT_H
static float g
enum CircFitStatus_t pprz_circfit_wei_float(struct circle_t *c, const float *x, const float *y, uint16_t n, struct circle_t *g)
CircFitStatus_t
@ CIRC_FIT_NORM_ERROR
@ CIRC_FIT_OK
@ CIRC_FIT_ERROR
@ CIRC_FIT_ITERATION_LIMIT
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.