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
24
enum
CircFitStatus_t
{
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
31
struct
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
*/
49
enum
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
g
static float g
Definition
oneloop_andi.c:340
circle_t::y
float y
Definition
pprz_circfit_float.h:33
circle_t::x
float x
Definition
pprz_circfit_float.h:32
pprz_circfit_wei_float
enum CircFitStatus_t pprz_circfit_wei_float(struct circle_t *c, const float *x, const float *y, uint16_t n, struct circle_t *g)
Definition
pprz_circfit_float.c:34
CircFitStatus_t
CircFitStatus_t
Definition
pprz_circfit_float.h:24
CIRC_FIT_NORM_ERROR
@ CIRC_FIT_NORM_ERROR
Definition
pprz_circfit_float.h:28
CIRC_FIT_OK
@ CIRC_FIT_OK
Definition
pprz_circfit_float.h:25
CIRC_FIT_ERROR
@ CIRC_FIT_ERROR
Definition
pprz_circfit_float.h:26
CIRC_FIT_ITERATION_LIMIT
@ CIRC_FIT_ITERATION_LIMIT
Definition
pprz_circfit_float.h:27
circle_t::r
float r
Definition
pprz_circfit_float.h:34
circle_t
Definition
pprz_circfit_float.h:31
std.h
uint16_t
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition
vl53l1_types.h:88
sw
airborne
math
pprz_circfit_float.h
Generated on Sun Aug 31 2025 11:28:31 for Paparazzi UAS by
1.9.8