Skip guard bands and null subcarrier in get_csi(). Add beta and csi metadata to stream tag from frame equalizer.
This commit is contained in:
+10
-1
@@ -42,5 +42,14 @@ 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 };
|
||||||
|
|
||||||
const gr_complex* base::get_csi() {
|
const gr_complex* base::get_csi() {
|
||||||
return d_H;
|
static gr_complex csi[52];
|
||||||
|
int j = 0;
|
||||||
|
for (int i = 0; i < 64; i++) {
|
||||||
|
if ((i == 32) || (i < 6) || (i > 58)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
csi[j] = d_H[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
return csi;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,6 +217,8 @@ frame_equalizer_impl::general_work (int noutput_items,
|
|||||||
dict = pmt::dict_add(dict, pmt::mp("snr"), pmt::from_double(d_equalizer->get_snr()));
|
dict = pmt::dict_add(dict, pmt::mp("snr"), pmt::from_double(d_equalizer->get_snr()));
|
||||||
dict = pmt::dict_add(dict, pmt::mp("freq"), pmt::from_double(d_freq));
|
dict = pmt::dict_add(dict, pmt::mp("freq"), pmt::from_double(d_freq));
|
||||||
dict = pmt::dict_add(dict, pmt::mp("freq_offset"), pmt::from_double(d_freq_offset_from_synclong));
|
dict = pmt::dict_add(dict, pmt::mp("freq_offset"), pmt::from_double(d_freq_offset_from_synclong));
|
||||||
|
dict = pmt::dict_add(dict, pmt::mp("beta"), pmt::from_double(beta));
|
||||||
|
dict = pmt::dict_add(dict, pmt::mp("csi"), pmt::init_c32vector(52, d_equalizer->get_csi()));
|
||||||
add_item_tag(0, nitems_written(0) + o,
|
add_item_tag(0, nitems_written(0) + o,
|
||||||
pmt::string_to_symbol("wifi_start"),
|
pmt::string_to_symbol("wifi_start"),
|
||||||
dict,
|
dict,
|
||||||
|
|||||||
Reference in New Issue
Block a user