Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
dragspeed.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Tom van Dijk
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  */
26 #ifndef DRAGSPEED_H
27 #define DRAGSPEED_H
28 
30 
32 {
33  // Estimated velocity
34  struct FloatVect2 vel;
35  // Low-pass filter
36  float filter;
37  // Drag coefficient calibration
38  struct FloatVect2 coeff;
40  // Zero calibration
41  struct FloatVect2 zero;
44 };
45 extern struct dragspeed_t dragspeed;
46 
47 extern void dragspeed_init(void);
48 
49 // Calibration functions for use in flight plans
50 extern bool dragspeed_calibrate_coeff(void);
51 extern bool dragspeed_calibrate_zero(void);
52 extern bool dragspeed_is_calibrating(void);
53 
54 #endif
55 
void dragspeed_init(void)
Definition: dragspeed.c:82
bool calibrate_coeff
Definition: dragspeed.h:39
bool dragspeed_is_calibrating(void)
Definition: dragspeed.c:117
float filter
Definition: dragspeed.h:36
bool zero_calibrated
Definition: dragspeed.h:43
struct FloatVect2 zero
Definition: dragspeed.h:41
struct FloatVect2 vel
Definition: dragspeed.h:34
struct dragspeed_t dragspeed
Definition: dragspeed.c:71
bool dragspeed_calibrate_coeff(void)
Definition: dragspeed.c:105
bool calibrate_zero
Definition: dragspeed.h:42
bool dragspeed_calibrate_zero(void)
Definition: dragspeed.c:111
struct FloatVect2 coeff
Definition: dragspeed.h:38
Paparazzi floating point algebra.