Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
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 "generated/airframe.h"
35 
36 #define HFF_STATE_SIZE 2
37 
38 struct HfilterFloat {
39  float x;
40  /* float xbias; */
41  float xdot;
42  float xdotdot;
43  float y;
44  /* float ybias; */
45  float ydot;
46  float ydotdot;
50  bool rollback;
51 };
52 
53 extern struct HfilterFloat b2_hff_state;
54 
55 extern void b2_hff_init(float init_x, float init_xdot, float init_y, float init_ydot);
56 extern void b2_hff_propagate(void);
57 extern void b2_hff_update_gps(struct FloatVect2 *pos_ned, struct FloatVect2 *speed_ned);
58 extern void b2_hff_update_pos(struct FloatVect2 pos, struct FloatVect2 Rpos);
59 extern void b2_hff_update_vel(struct FloatVect2 vel, struct FloatVect2 Rvel);
60 extern void b2_hff_realign(struct FloatVect2 pos, struct FloatVect2 vel);
61 
62 #endif /* HF_FLOAT_H */
unsigned short uint16_t
Definition: types.h:16
#define HFF_STATE_SIZE
Definition: hf_float.h:36
void b2_hff_init(float init_x, float init_xdot, float init_y, float init_ydot)
Definition: hf_float.c:268
void b2_hff_propagate(void)
Definition: hf_float.c:470
void b2_hff_update_gps(struct FloatVect2 *pos_ned, struct FloatVect2 *speed_ned)
Definition: hf_float.c:532
Paparazzi floating point algebra.
float yP[HFF_STATE_SIZE][HFF_STATE_SIZE]
Definition: hf_float.h:48
float x
Definition: hf_float.h:39
bool rollback
Definition: hf_float.h:50
float y
Definition: hf_float.h:43
float xdot
Definition: hf_float.h:41
float xdotdot
Definition: hf_float.h:42
float ydot
Definition: hf_float.h:45
void b2_hff_update_vel(struct FloatVect2 vel, struct FloatVect2 Rvel)
Definition: hf_float.c:757
void b2_hff_update_pos(struct FloatVect2 pos, struct FloatVect2 Rpos)
Definition: hf_float.c:685
uint16_t lag_counter
Definition: hf_float.h:49
struct HfilterFloat b2_hff_state
Definition: hf_float.c:120
float xP[HFF_STATE_SIZE][HFF_STATE_SIZE]
Definition: hf_float.h:47
float ydotdot
Definition: hf_float.h:46
void b2_hff_realign(struct FloatVect2 pos, struct FloatVect2 vel)
Definition: hf_float.c:594