22#ifndef PPRZ_CIRCFIT_EPSILON
23#define PPRZ_CIRCFIT_EPSILON 1e-3f
26#ifndef PPRZ_CIRCFIT_ITER_MAX
27#define PPRZ_CIRCFIT_ITER_MAX 250
30#ifndef PPRZ_CIRCFIT_NORM_CUTOFF
31#define PPRZ_CIRCFIT_NORM_CUTOFF 1e-6f
55 float sum_norm = 0.0f;
61 for (
int i = 0; i < n; i++) {
62 norm[i] = sqrtf((x[i] - x_prev) * (x[i] - x_prev) + (y[i] - y_prev) * (y[i] - y_prev));
68 for (
int i = 0; i < n; i++) {
73 c->
x += x[i] + c->
r * (x_prev - x[i]) / norm[i];
74 c->
y += y[i] + c->
r * (y_prev - y[i]) / norm[i];
#define PPRZ_CIRCFIT_ITER_MAX
enum CircFitStatus_t pprz_circfit_wei_float(struct circle_t *c, const float *x, const float *y, uint16_t n, struct circle_t *g)
#define PPRZ_CIRCFIT_EPSILON
#define PPRZ_CIRCFIT_NORM_CUTOFF
@ CIRC_FIT_ITERATION_LIMIT
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.