27 #define MEDIAN_DATASIZE 5
70 while (temp < filter->sortData[j] && j >= 0) {
88 #define InitMedianFilterVect3Int(_f) { \
89 for (int i = 0; i < 3; i++) { \
90 init_median_filter(&(_f.mf[i])); \
94 #define InitMedianFilterEulerInt(_f) InitMedianFilterVect3Int(_f)
95 #define InitMedianFilterRatesInt(_f) InitMedianFilterVect3Int(_f)
97 #define UpdateMedianFilterVect3Int(_f, _v) { \
98 (_v).x = update_median_filter(&(_f.mf[0]), (_v).x); \
99 (_v).y = update_median_filter(&(_f.mf[1]), (_v).y); \
100 (_v).z = update_median_filter(&(_f.mf[2]), (_v).z); \
103 #define UpdateMedianFilterEulerInt(_f, _v) { \
104 (_v).phi = update_median_filter(&(_f.mf[0]), (_v).phi); \
105 (_v).theta = update_median_filter(&(_f.mf[1]), (_v).theta); \
106 (_v).psi = update_median_filter(&(_f.mf[2]), (_v).psi); \
109 #define UpdateMedianFilterRatesInt(_f, _v) { \
110 (_v).p = update_median_filter(&(_f.mf[0]), (_v).p); \
111 (_v).q = update_median_filter(&(_f.mf[1]), (_v).q); \
112 (_v).r = update_median_filter(&(_f.mf[2]), (_v).r); \
115 #define GetMedianFilterVect3Int(_f, _v) { \
116 (_v).x = get_median_filter(&(_f.mf[0])); \
117 (_v).y = get_median_filter(&(_f.mf[1])); \
118 (_v).z = get_median_filter(&(_f.mf[2])); \
121 #define GetMedianFilterEulerInt(_f, _v) { \
122 (_v).phi = get_median_filter(&(_f.mf[0])); \
123 (_v).theta = get_median_filter(&(_f.mf[1])); \
124 (_v).psi = get_median_filter(&(_f.mf[2])); \
127 #define GetMedianFilterRatesInt(_f, _v) { \
128 (_v).p = get_median_filter(&(_f.mf[0])); \
129 (_v).q = get_median_filter(&(_f.mf[1])); \
130 (_v).r = get_median_filter(&(_f.mf[2])); \
Paparazzi fixed point algebra.