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
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)
 

Data Structure Documentation

struct MedianFilterInt

Definition at line 32 of file median_filter.h.

Data Fields
int32_t data[MEDIAN_DATASIZE]
int8_t dataIndex
int32_t sortData[MEDIAN_DATASIZE]
struct MedianFilter3Int

Definition at line 84 of file median_filter.h.

+ Collaboration diagram for MedianFilter3Int:
Data Fields
struct MedianFilterInt mf[3]

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:79

Definition at line 121 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:79
static float p[2][2]

Definition at line 127 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:79

Definition at line 115 of file median_filter.h.

#define InitMedianFilterEulerInt (   _f)    InitMedianFilterVect3Int(_f)

Definition at line 94 of file median_filter.h.

#define InitMedianFilterRatesInt (   _f)    InitMedianFilterVect3Int(_f)

Definition at line 95 of file median_filter.h.

Referenced by imu_navgo_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 88 of file median_filter.h.

Referenced by imu_krooz_init(), and imu_navgo_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:51

Definition at line 103 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:51
static float p[2][2]

Definition at line 109 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:51

Definition at line 97 of file median_filter.h.

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

Function Documentation

int32_t get_median_filter ( struct MedianFilterInt filter)
inline

Definition at line 79 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(), and opticflow_calc_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 51 of file median_filter.h.

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

Referenced by ardrone_baro_event(), calc_edgeflow_tot(), and calc_fast9_lukas_kanade().

+ Here is the caller graph for this function: