Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
median_filter.h File Reference
#include "std.h"
#include "math/pprz_algebra_int.h"
+ Include dependency graph for median_filter.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  MedianFilterInt
 
struct  MedianFilter3Int
 

Macros

#define MEDIAN_DATASIZE   5
 
#define InitMedianFilterVect3Int(_f)
 
#define InitMedianFilterEulerInt(_f)   InitMedianFilterVect3Int(_f)
 
#define InitMedianFilterRatesInt(_f)   InitMedianFilterVect3Int(_f)
 
#define UpdateMedianFilterVect3Int(_f, _v)
 
#define UpdateMedianFilterEulerInt(_f, _v)
 
#define UpdateMedianFilterRatesInt(_f, _v)
 
#define GetMedianFilterVect3Int(_f, _v)
 
#define GetMedianFilterEulerInt(_f, _v)
 
#define GetMedianFilterRatesInt(_f, _v)
 

Functions

void init_median_filter (struct MedianFilterInt *filter)
 
int32_t update_median_filter (struct MedianFilterInt *filter, int32_t new_data)
 
int32_t get_median_filter (struct MedianFilterInt *filter)
 

Macro Definition Documentation

#define GetMedianFilterEulerInt (   _f,
  _v 
)
Value:
{ \
(_v).phi = get_median_filter(&(_f.mf[0])); \
(_v).theta = get_median_filter(&(_f.mf[1])); \
(_v).psi = get_median_filter(&(_f.mf[2])); \
}
int32_t get_median_filter(struct MedianFilterInt *filter)
Definition: median_filter.h:78

Definition at line 119 of file median_filter.h.

#define GetMedianFilterRatesInt (   _f,
  _v 
)
Value:
{ \
(_v).p = get_median_filter(&(_f.mf[0])); \
(_v).q = get_median_filter(&(_f.mf[1])); \
(_v).r = get_median_filter(&(_f.mf[2])); \
}
int32_t get_median_filter(struct MedianFilterInt *filter)
Definition: median_filter.h:78
static float p[2][2]

Definition at line 125 of file median_filter.h.

#define GetMedianFilterVect3Int (   _f,
  _v 
)
Value:
{ \
(_v).x = get_median_filter(&(_f.mf[0])); \
(_v).y = get_median_filter(&(_f.mf[1])); \
(_v).z = get_median_filter(&(_f.mf[2])); \
}
int32_t get_median_filter(struct MedianFilterInt *filter)
Definition: median_filter.h:78

Definition at line 113 of file median_filter.h.

#define InitMedianFilterEulerInt (   _f)    InitMedianFilterVect3Int(_f)

Definition at line 92 of file median_filter.h.

#define InitMedianFilterRatesInt (   _f)    InitMedianFilterVect3Int(_f)

Definition at line 93 of file median_filter.h.

Referenced by imu_impl_init().

#define InitMedianFilterVect3Int (   _f)
Value:
{ \
for (int i = 0; i < 3; i++) { \
init_median_filter(&(_f.mf[i])); \
} \
}
void init_median_filter(struct MedianFilterInt *filter)
Definition: median_filter.h:41

Definition at line 86 of file median_filter.h.

Referenced by imu_impl_init().

#define MEDIAN_DATASIZE   5

Definition at line 27 of file median_filter.h.

Referenced by get_median_filter(), init_median_filter(), and update_median_filter().

#define UpdateMedianFilterEulerInt (   _f,
  _v 
)
Value:
{ \
(_v).phi = update_median_filter(&(_f.mf[0]), (_v).phi); \
(_v).theta = update_median_filter(&(_f.mf[1]), (_v).theta); \
(_v).psi = update_median_filter(&(_f.mf[2]), (_v).psi); \
}
int32_t update_median_filter(struct MedianFilterInt *filter, int32_t new_data)
Definition: median_filter.h:50

Definition at line 101 of file median_filter.h.

#define UpdateMedianFilterRatesInt (   _f,
  _v 
)
Value:
{ \
(_v).p = update_median_filter(&(_f.mf[0]), (_v).p); \
(_v).q = update_median_filter(&(_f.mf[1]), (_v).q); \
(_v).r = update_median_filter(&(_f.mf[2]), (_v).r); \
}
int32_t update_median_filter(struct MedianFilterInt *filter, int32_t new_data)
Definition: median_filter.h:50
static float p[2][2]

Definition at line 107 of file median_filter.h.

Referenced by imu_navgo_event().

#define UpdateMedianFilterVect3Int (   _f,
  _v 
)
Value:
{ \
(_v).x = update_median_filter(&(_f.mf[0]), (_v).x); \
(_v).y = update_median_filter(&(_f.mf[1]), (_v).y); \
(_v).z = update_median_filter(&(_f.mf[2]), (_v).z); \
}
int32_t update_median_filter(struct MedianFilterInt *filter, int32_t new_data)
Definition: median_filter.h:50

Definition at line 95 of file median_filter.h.

Referenced by imu_krooz_event(), imu_navgo_event(), and imu_periodic().

Function Documentation

int32_t get_median_filter ( struct MedianFilterInt filter)
inline

Definition at line 78 of file median_filter.h.

References MEDIAN_DATASIZE, and MedianFilterInt::sortData.

void init_median_filter ( struct MedianFilterInt filter)
inline

Definition at line 41 of file median_filter.h.

References MedianFilterInt::data, MedianFilterInt::dataIndex, MEDIAN_DATASIZE, and MedianFilterInt::sortData.

Referenced by baro_init().

+ Here is the caller graph for this function:

int32_t update_median_filter ( struct MedianFilterInt filter,
int32_t  new_data 
)
inline

Definition at line 50 of file median_filter.h.

References MedianFilterInt::data, MedianFilterInt::dataIndex, MEDIAN_DATASIZE, and MedianFilterInt::sortData.

Referenced by ardrone_baro_event().

+ Here is the caller graph for this function: