Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 */
unsigned short uint16_t
Definition: types.h:16
void hff_realign(struct FloatVect2 pos, struct FloatVect2 vel)
Definition: hf_float.c:602
struct HfilterFloat hff
Definition: hf_float.c:124
#define HFF_STATE_SIZE
Definition: hf_float.h:38
void hff_update_pos(struct FloatVect2 pos, struct FloatVect2 Rpos)
Update position.
Definition: hf_float.c:711
float ybias
Definition: hf_float.h:48
Paparazzi floating point algebra.
void hff_update_gps(struct FloatVect2 *pos_ned, struct FloatVect2 *speed_ned)
Definition: hf_float.c:541
void hff_init(float init_x, float init_xdot, float init_y, float init_ydot)
Definition: hf_float.c:274
void hff_update_vel(struct FloatVect2 vel, struct FloatVect2 Rvel)
Definition: hf_float.c:806
float yP[HFF_STATE_SIZE][HFF_STATE_SIZE]
Definition: hf_float.h:50
float x
Definition: hf_float.h:41
bool rollback
Definition: hf_float.h:52
float y
Definition: hf_float.h:45
float xdot
Definition: hf_float.h:42
void hff_propagate(void)
Definition: hf_float.c:479
float xdotdot
Definition: hf_float.h:43
float ydot
Definition: hf_float.h:46
uint16_t lag_counter
Definition: hf_float.h:51
float xbias
Definition: hf_float.h:44
float xP[HFF_STATE_SIZE][HFF_STATE_SIZE]
Definition: hf_float.h:49
Paparazzi fixed point algebra.
float ydotdot
Definition: hf_float.h:47