Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
vf_extended_float.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2009 Antoine Drouin <poinix@gmail.com>
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 
30 #ifndef VF_EXTENDED_FLOAT_H
31 #define VF_EXTENDED_FLOAT_H
32 
33 #define VFF_STATE_SIZE 5
34 
35 struct VffExtended {
36  /* state vector */
37  float z;
38  float zdot;
39  float bias;
40  float offset;
41  float obs_height;
42 
43  float zdotdot;
44  float z_meas;
45  float z_meas_baro;
46 
48 
49  float accel_noise;
50  float r_baro;
51  float r_alt;
52  float r_obs_height;
53 };
54 
55 extern struct VffExtended vff;
56 
57 extern void vff_init_zero(void);
58 extern void vff_init(float z, float zdot, float accel_bias, float baro_offset, float obstacle_hieght);
59 extern void vff_propagate(float accel, float dt);
60 extern void vff_update_baro(float z_meas);
61 extern void vff_update_z(float z_meas);
62 extern void vff_update_baro_conf(float z_meas, float conf);
63 extern void vff_update_z_conf(float z_meas, float conf);
64 extern void vff_update_vz_conf(float vz_meas, float conf);
65 extern void vff_realign(float z_meas);
66 extern void vff_update_agl(float z_meas, float conf);
67 
68 #endif /* VF_EXTENDED_FLOAT_H */
vff_update_z_conf
void vff_update_z_conf(float z_meas, float conf)
Definition: vf_extended_float.c:310
vff_realign
void vff_realign(float z_meas)
Definition: vf_extended_float.c:384
VffExtended::bias
float bias
accel bias estimate in m/s^2
Definition: vf_extended_float.h:39
VffExtended::P
float P[VFF_STATE_SIZE][VFF_STATE_SIZE]
covariance matrix
Definition: vf_extended_float.h:47
VffExtended::r_obs_height
float r_obs_height
Definition: vf_extended_float.h:52
VffExtended::z
float z
z-position estimate in m (NED, z-down)
Definition: vf_extended_float.h:37
vff_init_zero
void vff_init_zero(void)
Definition: vf_extended_float.c:107
VffExtended::offset
float offset
baro offset estimate
Definition: vf_extended_float.h:40
vff_update_baro
void vff_update_baro(float z_meas)
Definition: vf_extended_float.c:333
vff
struct VffExtended vff
Definition: vf_extended_float.c:89
VffExtended
Definition: vf_extended_float.h:35
vff_propagate
void vff_propagate(float accel, float dt)
Propagate the filter in time.
Definition: vf_extended_float.c:181
VFF_STATE_SIZE
#define VFF_STATE_SIZE
Definition: vf_extended_float.h:33
vff_init
void vff_init(float z, float zdot, float accel_bias, float baro_offset, float obstacle_hieght)
Definition: vf_extended_float.c:127
VffExtended::zdot
float zdot
z-velocity estimate in m/s (NED, z-down)
Definition: vf_extended_float.h:38
VffExtended::obs_height
float obs_height
estimate of height of obstacles under the vehicle
Definition: vf_extended_float.h:41
VffExtended::zdotdot
float zdotdot
z-acceleration in m/s^2 (NED, z-down)
Definition: vf_extended_float.h:43
vff_update_baro_conf
void vff_update_baro_conf(float z_meas, float conf)
Definition: vf_extended_float.c:327
VffExtended::r_alt
float r_alt
Definition: vf_extended_float.h:51
VffExtended::z_meas
float z_meas
last z measurement in m
Definition: vf_extended_float.h:44
vff_update_z
void vff_update_z(float z_meas)
Definition: vf_extended_float.c:316
vff_update_agl
void vff_update_agl(float z_meas, float conf)
Definition: vf_extended_float.c:321
VffExtended::z_meas_baro
float z_meas_baro
last z measurement from baro in m
Definition: vf_extended_float.h:45
VffExtended::accel_noise
float accel_noise
Definition: vf_extended_float.h:49
vff_update_vz_conf
void vff_update_vz_conf(float vz_meas, float conf)
Definition: vf_extended_float.c:433
VffExtended::r_baro
float r_baro
Definition: vf_extended_float.h:50