Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
hf_float.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2009 Antoine Drouin <poinix@gmail.com>
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, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
29 #ifndef HF_FLOAT_H
30 #define HF_FLOAT_H
31 
32 #include "std.h"
34 #include "math/pprz_algebra_int.h"
35 #include "generated/airframe.h"
36 
37 // X = [ z zdot bias ]
38 #define HFF_STATE_SIZE 3
39 
40 struct HfilterFloat {
41  float x;
42  float xdot;
43  float xdotdot;
44  float xbias;
45  float y;
46  float ydot;
47  float ydotdot;
48  float ybias;
52  bool rollback;
53 };
54 
55 extern struct HfilterFloat hff;
56 
57 extern void hff_init(float init_x, float init_xdot, float init_y, float init_ydot);
58 extern void hff_propagate(void);
59 extern void hff_update_gps(struct FloatVect2 *pos_ned, struct FloatVect2 *speed_ned);
60 extern void hff_update_pos(struct FloatVect2 pos, struct FloatVect2 Rpos);
61 extern void hff_update_vel(struct FloatVect2 vel, struct FloatVect2 Rvel);
62 extern void hff_realign(struct FloatVect2 pos, struct FloatVect2 vel);
63 
64 #endif /* HF_FLOAT_H */
hff_update_vel
void hff_update_vel(struct FloatVect2 vel, struct FloatVect2 Rvel)
Definition: hf_float.c:806
uint16_t
unsigned short uint16_t
Definition: types.h:16
HfilterFloat::lag_counter
uint16_t lag_counter
Definition: hf_float.h:51
HfilterFloat::rollback
bool rollback
Definition: hf_float.h:52
HfilterFloat::xdot
float xdot
Definition: hf_float.h:42
pprz_algebra_float.h
Paparazzi floating point algebra.
HfilterFloat::ybias
float ybias
Definition: hf_float.h:48
pprz_algebra_int.h
Paparazzi fixed point algebra.
hff
struct HfilterFloat hff
Definition: hf_float.c:124
FloatVect2
Definition: pprz_algebra_float.h:49
std.h
HfilterFloat::ydot
float ydot
Definition: hf_float.h:46
HfilterFloat::x
float x
Definition: hf_float.h:41
HfilterFloat::y
float y
Definition: hf_float.h:45
hff_propagate
void hff_propagate(void)
Definition: hf_float.c:479
HfilterFloat::xP
float xP[HFF_STATE_SIZE][HFF_STATE_SIZE]
Definition: hf_float.h:49
HfilterFloat
Definition: hf_float.h:40
hff_init
void hff_init(float init_x, float init_xdot, float init_y, float init_ydot)
Definition: hf_float.c:274
HfilterFloat::ydotdot
float ydotdot
Definition: hf_float.h:47
hff_realign
void hff_realign(struct FloatVect2 pos, struct FloatVect2 vel)
Definition: hf_float.c:602
hff_update_pos
void hff_update_pos(struct FloatVect2 pos, struct FloatVect2 Rpos)
Update position.
Definition: hf_float.c:711
HfilterFloat::yP
float yP[HFF_STATE_SIZE][HFF_STATE_SIZE]
Definition: hf_float.h:50
HfilterFloat::xbias
float xbias
Definition: hf_float.h:44
HFF_STATE_SIZE
#define HFF_STATE_SIZE
Definition: hf_float.h:38
hff_update_gps
void hff_update_gps(struct FloatVect2 *pos_ned, struct FloatVect2 *speed_ned)
Definition: hf_float.c:541
HfilterFloat::xdotdot
float xdotdot
Definition: hf_float.h:43