Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ins_alt_float.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2004-2006 Pascal Brisset, Antoine Drouin
3  * Copyright (C) 2012 Gautier Hattenberger
4  *
5  * This file is part of paparazzi.
6  *
7  * paparazzi is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * paparazzi is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with paparazzi; see the file COPYING. If not, write to
19  * the Free Software Foundation, 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22 
28 #ifndef INS_ALT_FLOAT_H
29 #define INS_ALT_FLOAT_H
30 
31 #include "subsystems/ins.h"
32 
33 #include <inttypes.h>
34 #include "std.h"
35 #include "state.h"
36 
37 
38 #if USE_BAROMETER
39 #ifdef BARO_MS5534A
40 #include "baro_MS5534A.h"
41 #endif
42 
43 #if USE_BARO_ETS
45 #endif
46 
47 #if USE_BARO_BMP
49 #endif
50 
51 #if USE_BARO_MS5611
53 #endif
54 
55 extern int32_t ins_qfe;
56 extern float ins_baro_alt;
57 extern bool_t ins_baro_initialised;
58 #endif //USE_BAROMETER
59 
60 extern float ins_alt;
61 
62 extern float ins_alt_dot;
63 
64 extern bool_t alt_kalman_enabled;
65 extern void alt_kalman_reset( void );
66 extern void alt_kalman_init( void );
67 extern void alt_kalman( float );
68 
69 #if USE_BAROMETER
70 /* Kalman filter cannot be disabled in this mode (no z_dot) */
71 #define EstimatorSetAlt(z) alt_kalman(z)
72 #else /* USE_BAROMETER */
73 #define EstimatorSetAlt(z) { \
74  if (!alt_kalman_enabled) { \
75  ins_alt = z; \
76  } else { \
77  alt_kalman(z); \
78  } \
79 }
80 #endif /* ! USE_BAROMETER */
81 
82 #endif /* INS_ALT_FLOAT_H */
int32_t ins_qfe
Definition: ins_alt_float.c:50
void alt_kalman_init(void)
float ins_alt_dot
estimated vertical speed in m/s (positive-up)
Definition: ins_alt_float.c:45
float ins_alt
estimated altitude above MSL in meters
Definition: ins_alt_float.c:44
Integrated Navigation System interface.
bool_t alt_kalman_enabled
float ins_baro_alt
Definition: ins_alt_float.c:52
bool_t ins_baro_initialised
Definition: ins_alt_float.c:51
Driver for the EagleTree Systems Altitude Sensor.
signed long int32_t
Definition: types.h:19
API to get/set the generic vehicle states.
void alt_kalman(float)
void alt_kalman_reset(void)