diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index beb4f18..2ce36d4 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -99,8 +99,11 @@ list(APPEND gr_ieee802_11_sources decode_mac.cc decode_signal.cc equalize_symbols.cc - equalizer/linear_comb.cc + equalizer/base.cc + equalizer/comb.cc + equalizer/ls.cc equalizer/lms.cc + equalizer/sta.cc ether_encap_impl.cc mac.cc mapper.cc diff --git a/lib/equalizer/base.cc b/lib/equalizer/base.cc new file mode 100644 index 0000000..0124481 --- /dev/null +++ b/lib/equalizer/base.cc @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2016 Bastian Bloessl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "base.h" +#include +#include + +using namespace gr::ieee802_11::equalizer; + +const gr_complex base::LONG[] = { + 0, 0, 0, 0, 0, 0, 1, 1, -1, -1, + 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, + 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, + 1, 1, 0, 1, -1, -1, 1, 1, -1, 1, + -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, + -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, + 0, 0, 0, 0 +}; + +const gr_complex base::POLARITY[127] = { + 1, 1, 1, 1,-1,-1,-1, 1,-1,-1,-1,-1, 1, 1,-1, 1, + -1,-1, 1, 1,-1, 1, 1,-1, 1, 1, 1, 1, 1, 1,-1, 1, + 1, 1,-1, 1, 1,-1,-1, 1, 1, 1,-1, 1,-1,-1,-1, 1, + -1, 1,-1,-1, 1,-1,-1, 1, 1, 1, 1, 1,-1,-1, 1, 1, + -1,-1, 1,-1, 1,-1, 1, 1,-1,-1,-1, 1, 1,-1,-1,-1, + -1, 1,-1,-1, 1,-1, 1, 1, 1, 1,-1, 1,-1, 1,-1, 1, + -1,-1,-1,-1,-1, 1,-1, 1, 1,-1, 1,-1, 1, 1, 1,-1, + -1, 1,-1,-1,-1, 1, 1, 1,-1,-1,-1,-1,-1,-1,-1 }; diff --git a/lib/equalizer/base.h b/lib/equalizer/base.h index 1e8ffb5..2e9193d 100644 --- a/lib/equalizer/base.h +++ b/lib/equalizer/base.h @@ -19,6 +19,7 @@ #define INCLUDED_IEEE802_11_EQUALIZER_BASE_H #include +#include namespace gr { namespace ieee802_11 { @@ -27,7 +28,13 @@ namespace equalizer { class base { public: virtual ~base() {}; - virtual void equalize(const gr_complex *in, gr_complex *out, int n) = 0; + virtual void equalize(gr_complex *in, int n, gr_complex *symbols, uint8_t *bits, boost::shared_ptr mod) = 0; + virtual double get_snr() = 0; + + static const gr_complex POLARITY[127]; + +protected: + static const gr_complex LONG[64]; }; } /* namespace channel_estimation */ diff --git a/lib/equalizer/comb.cc b/lib/equalizer/comb.cc new file mode 100644 index 0000000..f27cb5b --- /dev/null +++ b/lib/equalizer/comb.cc @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2015 Bastian Bloessl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "comb.h" + +using namespace gr::ieee802_11::equalizer; + +void comb::equalize(gr_complex *in, int n, gr_complex *symbols, uint8_t *bits, boost::shared_ptr mod) { + + gr_complex pilot[4]; + + if(n < 2) { + pilot[0] = in[11]; + pilot[1] = -in[25]; + pilot[2] = in[39]; + pilot[3] = in[53]; + } else { + gr_complex p = POLARITY[(n - 2) % 127]; + pilot[0] = in[11] * p; + pilot[1] = in[25] * p; + pilot[2] = in[39] * p; + pilot[3] = in[53] * -p; + } + + gr_complex avg = (pilot[0] + pilot[1] + pilot[2] + pilot[3]) / gr_complex(4, 0); + + for(int i = 0; i < 64; i++) { + gr_complex H; + if(i <= 11) { + H = gr_complex((11-i) / 11.0, 0) * avg + gr_complex( i / 11.0, 0) * pilot[0]; + } else if(i <= 25) { + H = gr_complex((25-i) / 14.0, 0) * pilot[0] + gr_complex((i-11) / 14.0, 0) * pilot[1]; + } else if(i <= 39) { + H = gr_complex((39-i) / 14.0, 0) * pilot[1] + gr_complex((i-25) / 14.0, 0) * pilot[2]; + } else if(i <= 53) { + H = gr_complex((53-i) / 14.0, 0) * pilot[2] + gr_complex((i-39) / 14.0, 0) * pilot[3]; + } else { + H = gr_complex((64-i) / 11.0, 0) * pilot[3] + gr_complex((i-53) / 11.0, 0) * avg; + } + + if(n == 0) { + d_H[i] = H; + } else { + d_H[i] = gr_complex(1-alpha, 0) * d_H[i] + gr_complex(alpha, 0) * H; + } + } + + int c = 0; + for(int i = 0; i < 64; i++) { + if( (i == 11) || (i == 25) || (i == 32) || (i == 39) || (i == 53) || (i < 6) || ( i > 58)) { + continue; + } else { + symbols[c] = in[i] / d_H[i]; + bits[c] = mod->decision_maker(&symbols[c]); + c++; + } + } +} + +double +comb::get_snr() { + return 42; +} diff --git a/lib/equalizer/linear_comb.h b/lib/equalizer/comb.h similarity index 71% rename from lib/equalizer/linear_comb.h rename to lib/equalizer/comb.h index dc598cc..cf26890 100644 --- a/lib/equalizer/linear_comb.h +++ b/lib/equalizer/comb.h @@ -15,8 +15,8 @@ * along with this program. If not, see . */ -#ifndef INCLUDED_IEEE802_11_EQUALIZER_LINEAR_COMB_H -#define INCLUDED_IEEE802_11_EQUALIZER_LINEAR_COMB_H +#ifndef INCLUDED_IEEE802_11_EQUALIZER_COMB_H +#define INCLUDED_IEEE802_11_EQUALIZER_COMB_H #include "base.h" @@ -24,16 +24,21 @@ namespace gr { namespace ieee802_11 { namespace equalizer { -class linear_comb: public base { +class comb: public base { public: - virtual void equalize(const gr_complex *in, gr_complex *out, int n); + virtual void equalize(gr_complex *in, int n, gr_complex *symbols, uint8_t *bits, boost::shared_ptr mod); + double get_snr(); + private: - static const gr_complex POLARITY[127]; + gr_complex d_H[64]; + + + const double alpha = 0.2; }; } /* namespace channel_estimation */ } /* namespace ieee802_11 */ } /* namespace gr */ -#endif /* INCLUDED_IEEE802_11_EQUALIZER_LINEAR_COMB_H */ +#endif /* INCLUDED_IEEE802_11_EQUALIZER_COMB_H */ diff --git a/lib/equalizer/linear_comb.cc b/lib/equalizer/linear_comb.cc deleted file mode 100644 index 455deaa..0000000 --- a/lib/equalizer/linear_comb.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2015 Bastian Bloessl - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "linear_comb.h" - -using namespace gr::ieee802_11::equalizer; - -void linear_comb::equalize(const gr_complex *in, gr_complex *out, int n) { - if(n < 2) - return; - - double avg_mag = (abs(in[11]) + abs(in[25]) + abs(in[39]) + abs(in[53])) / 4; - - gr_complex p = POLARITY[(n - 2) % 127 ]; - - double p1 = arg( p * in[11]); - double p2 = arg( p * in[25] * conj(p * in[11])) + p1; - double p3 = arg( p * in[39] * conj(p * in[25])) + p2; - double p4 = arg(-p * in[53] * conj(p * in[39])) + p3; - - double my = (p1 + p2 + p3 + p4) / 4; - double mx = (11.0 + 25 + 39 + 53) / 4; - - double var = (((11.0 * 11.0) + (25.0 * 25.0) + (39.0 * 39.0) + (53.0 * 53.0)) / 4) - (mx * mx); - double cov = (( (p1 * 11) + (p2 * 25) + (p3 * 39) + (p4 * 53) ) / 4) - (mx * my); - double beta = cov / var; - double alpha = my - beta * mx; - - int c = 0; - for(int n = 0; n < 64; n++) { - if( (n == 11) || (n == 25) || (n == 32) || (n == 39) || (n == 53) || (n < 6) || ( n > 58)) { - continue; - } else { - out[c] = in[n] * exp(gr_complex(0, -n * beta - alpha)) * gr_complex(1 / avg_mag, 0); - c++; - } - } - -} - -const gr_complex linear_comb::POLARITY[127] = { - 1, 1, 1, 1,-1,-1,-1, 1,-1,-1,-1,-1, 1, 1,-1, 1, - -1,-1, 1, 1,-1, 1, 1,-1, 1, 1, 1, 1, 1, 1,-1, 1, - 1, 1,-1, 1, 1,-1,-1, 1, 1, 1,-1, 1,-1,-1,-1, 1, - -1, 1,-1,-1, 1,-1,-1, 1, 1, 1, 1, 1,-1,-1, 1, 1, - -1,-1, 1,-1, 1,-1, 1, 1,-1,-1,-1, 1, 1,-1,-1,-1, - -1, 1,-1,-1, 1,-1, 1, 1, 1, 1,-1, 1,-1, 1,-1, 1, - -1,-1,-1,-1,-1, 1,-1, 1, 1,-1, 1,-1, 1, 1, 1,-1, - -1, 1,-1,-1,-1, 1, 1, 1,-1,-1,-1,-1,-1,-1,-1 }; diff --git a/lib/equalizer/lms.cc b/lib/equalizer/lms.cc index 65dddf3..395dfc0 100644 --- a/lib/equalizer/lms.cc +++ b/lib/equalizer/lms.cc @@ -21,84 +21,44 @@ using namespace gr::ieee802_11::equalizer; -void lms::equalize(const gr_complex *in, gr_complex *out, int n) { - - static float freq_offset = 0; - static float freq_sum = 0; - static float alpha = 0.9; +void lms::equalize(gr_complex *in, int n, gr_complex *symbols, uint8_t *bits, boost::shared_ptr mod) { if(n == 0) { - std::memcpy(carrier, in, 64 * sizeof(gr_complex)); + std::memcpy(d_H, in, 64 * sizeof(gr_complex)); + } else if(n == 1) { - gr_complex sum = - (carrier[11] * conj(in[11])) + - (carrier[25] * conj(in[25])) + - (carrier[39] * conj(in[39])) + - (carrier[53] * conj(in[53])); - freq_offset = arg(sum); - freq_sum = 0; + double signal = 0; + double noise = 0; for(int i = 0; i < 64; i++) { - carrier[i] += in[i]; - carrier[i] *= ref[i] * gr_complex(0.5, 0); + noise += std::pow(std::abs(d_H[i] - in[i]), 2); + signal += std::pow(std::abs(d_H[i] + in[i]), 2); } + + d_snr = 10 * std::log10(signal / noise / 2); + + for(int i = 0; i < 64; i++) { + d_H[i] += in[i]; + d_H[i] /= LONG[i] * gr_complex(2, 0); + } + } else { - - gr_complex p = POLARITY[(n - 2) % 127]; - gr_complex sum = - (carrier[11] * conj(in[11]) * p) + - (carrier[25] * conj(in[25]) * p) + - (carrier[39] * conj(in[39]) * p) + - (carrier[53] * conj(in[53]) * -p); - - freq_offset = (1 - alpha) * freq_offset + alpha * arg(sum); - freq_sum += freq_offset; - - //std::cout << "lms: symbol " << n - // << " p1 " << abs(carrier[11] * conj(in[11]) * p) - // << " p2 " << abs(carrier[25] * conj(in[25]) * p) - // << " p3 " << abs(carrier[39] * conj(in[39]) * p) - // << " p4 " << abs(carrier[53] * conj(in[53]) * -p) - // << std::endl; - //std::cout << "lms: symbol " << n - // << " p1 " << arg(carrier[11] * conj(in[11]) * p) - // << " p2 " << arg(carrier[25] * conj(in[25]) * p) - // << " p3 " << arg(carrier[39] * conj(in[39]) * p) - // << " p4 " << arg(carrier[53] * conj(in[53]) * -p) - // << std::endl; - - carrier[11] = in[11] * p; - carrier[25] = in[25] * p; - carrier[39] = in[39] * p; - carrier[53] = in[53] * -p; - int c = 0; for(int i = 0; i < 64; i++) { if( (i == 11) || (i == 25) || (i == 32) || (i == 39) || (i == 53) || (i < 6) || ( i > 58)) { continue; } else { - out[c] = in[i] / carrier[i] * exp(gr_complex(0, freq_sum)); + symbols[c] = in[i] / d_H[i]; + bits[c] = mod->decision_maker(&symbols[c]); + gr_complex point; + mod->map_to_points(bits[c], &point); + d_H[i] = gr_complex(1-alpha,0) * d_H[i] + gr_complex(alpha,0) * in[i] / point; c++; } } } } -const gr_complex lms::ref[] = { - 0, 0, 0, 0, 0, 0, 1, 1, -1, -1, - 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, - 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, - 1, 1, 0, 1, -1, -1, 1, 1, -1, 1, - -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, - -1, 1, -1, 1, -1, 1, 1, 1, 1, 0, - 0, 0, 0, 0 -}; - -const gr_complex lms::POLARITY[127] = { - 1, 1, 1, 1,-1,-1,-1, 1,-1,-1,-1,-1, 1, 1,-1, 1, - -1,-1, 1, 1,-1, 1, 1,-1, 1, 1, 1, 1, 1, 1,-1, 1, - 1, 1,-1, 1, 1,-1,-1, 1, 1, 1,-1, 1,-1,-1,-1, 1, - -1, 1,-1,-1, 1,-1,-1, 1, 1, 1, 1, 1,-1,-1, 1, 1, - -1,-1, 1,-1, 1,-1, 1, 1,-1,-1,-1, 1, 1,-1,-1,-1, - -1, 1,-1,-1, 1,-1, 1, 1, 1, 1,-1, 1,-1, 1,-1, 1, - -1,-1,-1,-1,-1, 1,-1, 1, 1,-1, 1,-1, 1, 1, 1,-1, - -1, 1,-1,-1,-1, 1, 1, 1,-1,-1,-1,-1,-1,-1,-1 }; +double +lms::get_snr() { + return d_snr; +} diff --git a/lib/equalizer/lms.h b/lib/equalizer/lms.h index c6d1d2f..094947f 100644 --- a/lib/equalizer/lms.h +++ b/lib/equalizer/lms.h @@ -27,11 +27,14 @@ namespace equalizer { class lms: public base { public: - virtual void equalize(const gr_complex *in, gr_complex *out, int n); + virtual void equalize(gr_complex *in, int n, gr_complex *symbols, uint8_t *bits, boost::shared_ptr mod); private: - gr_complex carrier[64]; - static const gr_complex ref[64]; - static const gr_complex POLARITY[127]; + double get_snr(); + + + gr_complex d_H[64]; + double d_snr; + const double alpha = 0.5; }; } /* namespace channel_estimation */ @@ -39,4 +42,3 @@ private: } /* namespace gr */ #endif /* INCLUDED_IEEE802_11_EQUALIZER_LMS_H */ - diff --git a/lib/equalizer/ls.cc b/lib/equalizer/ls.cc new file mode 100644 index 0000000..e8bdc68 --- /dev/null +++ b/lib/equalizer/ls.cc @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2016 Bastian Bloessl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ls.h" +#include +#include + +using namespace gr::ieee802_11::equalizer; + +void ls::equalize(gr_complex *in, int n, gr_complex *symbols, uint8_t *bits, boost::shared_ptr mod) { + + if(n == 0) { + std::memcpy(d_H, in, 64 * sizeof(gr_complex)); + + } else if(n == 1) { + double signal = 0; + double noise = 0; + for(int i = 0; i < 64; i++) { + noise += std::pow(std::abs(d_H[i] - in[i]), 2); + signal += std::pow(std::abs(d_H[i] + in[i]), 2); + } + + d_snr = 10 * std::log10(signal / noise / 2); + + for(int i = 0; i < 64; i++) { + d_H[i] += in[i]; + d_H[i] /= LONG[i] * gr_complex(2, 0); + } + + } else { + + int c = 0; + for(int i = 0; i < 64; i++) { + if( (i == 11) || (i == 25) || (i == 32) || (i == 39) || (i == 53) || (i < 6) || ( i > 58)) { + continue; + } else { + symbols[c] = in[i] / d_H[i]; + bits[c] = mod->decision_maker(&symbols[c]); + c++; + } + } + } +} + +double ls::get_snr() { + return d_snr; +} diff --git a/lib/equalizer/ls.h b/lib/equalizer/ls.h new file mode 100644 index 0000000..2bbf68c --- /dev/null +++ b/lib/equalizer/ls.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2016 Bastian Bloessl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef INCLUDED_IEEE802_11_EQUALIZER_LS_H +#define INCLUDED_IEEE802_11_EQUALIZER_LS_H + +#include "base.h" +#include + +namespace gr { +namespace ieee802_11 { +namespace equalizer { + +class ls: public base { +public: + virtual void equalize(gr_complex *in, int n, gr_complex *symbols, uint8_t *bits, boost::shared_ptr mod); + virtual double get_snr(); +private: + gr_complex d_H[64]; + double d_snr; +}; + +} /* namespace channel_estimation */ +} /* namespace ieee802_11 */ +} /* namespace gr */ + +#endif /* INCLUDED_IEEE802_11_EQUALIZER_LS_H */ + diff --git a/lib/equalizer/sta.cc b/lib/equalizer/sta.cc new file mode 100644 index 0000000..54f9e57 --- /dev/null +++ b/lib/equalizer/sta.cc @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2015 Bastian Bloessl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "sta.h" +#include +#include + +using namespace gr::ieee802_11::equalizer; + +void sta::equalize(gr_complex *in, int n, gr_complex *symbols, uint8_t *bits, boost::shared_ptr mod) { + + if(n == 0) { + std::memcpy(d_H, in, 64 * sizeof(gr_complex)); + + } else if(n == 1) { + double signal = 0; + double noise = 0; + for(int i = 0; i < 64; i++) { + noise += std::pow(std::abs(d_H[i] - in[i]), 2); + signal += std::pow(std::abs(d_H[i] + in[i]), 2); + } + + d_snr = 10 * std::log10(signal / noise / 2); + + for(int i = 0; i < 64; i++) { + d_H[i] += in[i]; + d_H[i] /= LONG[i] * gr_complex(2, 0); + } + + } else { + + gr_complex H_update[64]; + gr_complex H[64]; + + gr_complex p = POLARITY[(n - 2) % 127]; + + H[11] = in[11] * p; + H[25] = in[25] * p; + H[39] = in[39] * p; + H[53] = in[53] * -p; + + int c = 0; + for(int i = 0; i < 64; i++) { + if( (i == 11) || (i == 25) || (i == 32) || (i == 39) || (i == 53) || (i < 6) || ( i > 58)) { + continue; + } else { + symbols[c] = in[i] / d_H[i]; + bits[c] = mod->decision_maker(&symbols[c]); + gr_complex point; + mod->map_to_points(bits[c], &point); + H[i] = in[i] / point; + c++; + } + } + + for(int i = 0; i < 64; i++) { + int n = 0; + gr_complex s = 0; + for(int k = i-beta; k <= i+beta; k++) { + if((k == 32) || (k < 6) || ( k > 58)) { + continue; + } + n++; + s += H[k]; + } + H_update[i] = s / gr_complex(n, 0); + } + + for(int i = 0; i < 64; i++) { + d_H[i] = gr_complex(1-alpha,0) * d_H[i] + gr_complex(alpha,0) * H_update[i]; + } + } +} + +double +sta::get_snr() { + return d_snr; +} diff --git a/lib/equalizer/sta.h b/lib/equalizer/sta.h new file mode 100644 index 0000000..bb619e7 --- /dev/null +++ b/lib/equalizer/sta.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2015 Bastian Bloessl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef INCLUDED_IEEE802_11_EQUALIZER_STA_H +#define INCLUDED_IEEE802_11_EQUALIZER_STA_H + +#include "base.h" +#include + +namespace gr { +namespace ieee802_11 { +namespace equalizer { + +class sta: public base { +public: + virtual void equalize(gr_complex *in, int n, gr_complex *symbols, uint8_t *bits, boost::shared_ptr mod); + double get_snr(); + +private: + gr_complex d_H[64]; + double d_snr; + + const double alpha = 0.5; + const int beta = 2; +}; + +} /* namespace channel_estimation */ +} /* namespace ieee802_11 */ +} /* namespace gr */ + +#endif /* INCLUDED_IEEE802_11_EQUALIZER_STA_H */