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 File Reference

Horizontal filter (x,y) to estimate position and velocity. More...

#include "std.h"
#include "math/pprz_algebra_float.h"
#include "math/pprz_algebra_int.h"
#include "generated/airframe.h"
+ Include dependency graph for hf_float.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HfilterFloat
 

Macros

#define HFF_STATE_SIZE   3
 

Functions

void hff_init (float init_x, float init_xdot, float init_y, float init_ydot)
 
void hff_propagate (void)
 
void hff_update_gps (struct FloatVect2 *pos_ned, struct FloatVect2 *speed_ned)
 
void hff_update_pos (struct FloatVect2 pos, struct FloatVect2 Rpos)
 Update position. More...
 
void hff_update_vel (struct FloatVect2 vel, struct FloatVect2 Rvel)
 
void hff_realign (struct FloatVect2 pos, struct FloatVect2 vel)
 

Variables

struct HfilterFloat hff
 

Detailed Description

Horizontal filter (x,y) to estimate position and velocity.

Definition in file hf_float.h.


Data Structure Documentation

struct HfilterFloat

Definition at line 40 of file hf_float.h.

Data Fields
uint16_t lag_counter
bool rollback
float x
float xbias
float xdot
float xdotdot
float xP[HFF_STATE_SIZE][HFF_STATE_SIZE]
float y
float ybias
float ydot
float ydotdot
float yP[HFF_STATE_SIZE][HFF_STATE_SIZE]

Macro Definition Documentation

#define HFF_STATE_SIZE   3

Definition at line 38 of file hf_float.h.

Referenced by hff_init_x(), and hff_init_y().

Function Documentation

void hff_realign ( struct FloatVect2  pos,
struct FloatVect2  vel 
)
void hff_update_gps ( struct FloatVect2 pos_ned,
struct FloatVect2 speed_ned 
)
void hff_update_pos ( struct FloatVect2  pos,
struct FloatVect2  Rpos 
)

Update position.

H = [1 0 0]; R = 0.1; // state residual y = rangemeter - H * Xm; // covariance residual S = H*Pm*H' + R; // kalman gain K = Pm*H'*inv(S); // update state Xp = Xm + K*y; // update covariance Pp = Pm - K*H*Pm;

Definition at line 711 of file hf_float.c.

References hff, hff_lost_counter, hff_update_x(), hff_update_y(), FloatVect2::x, and FloatVect2::y.

Referenced by pos_est_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void hff_update_vel ( struct FloatVect2  vel,
struct FloatVect2  Rvel 
)

Definition at line 806 of file hf_float.c.

References hff, hff_speed_lost_counter, hff_update_xdot(), hff_update_ydot(), FloatVect2::x, and FloatVect2::y.

Referenced by vel_est_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation