Hi,
I want to look at the number of symbols copied for each frame received in wifi_rx flow graph. I have been trying to understand how the start of each frame is calculated and by looking at the code it seems like its being done in the wifi sync_short block where the auto correlation coefficient is being checked against a threshold and then the d_plateau is being updated until it reaches MIN_PLATEAU.
However, for the number of symbols per frame, there is a MAX_SAMPLES which is set to 540*80 where 80 is the number of samples per symbol but I don't understand why is the total number of symbols per frame set to 540?
Also in the code from the wifi sync_short.cc:
case COPY: {
int o = 0;
while( o < ninput && o < noutput && d_copied < MAX_SAMPLES) {
if(in_cor[o] > d_threshold) {
if(d_plateau < MIN_PLATEAU) {
d_plateau++;
// there's another frame
} else if(d_copied > MIN_GAP) {
d_copied = 0;
d_plateau = 0;
d_freq_offset = arg(in_abs[o]) / 16;
insert_tag(nitems_written(0) + o, d_freq_offset);
dout << "SHORT Frame!" << std::endl;
break;
}
} else {
d_plateau = 0;
}
out[o] = in[o] * exp(gr_complex(0, -d_freq_offset * d_copied));
o++;
d_copied++;
}
if(d_copied == MAX_SAMPLES) {
d_state = SEARCH;
}
dout << "SHORT copied " << o << std::endl;
consume_each(o);
return o;
}
Whats the role of MIN_GAP? Why is it being used to detect a shorter frame?
Moreover, does it mean that the number of symbols per frame can be either MAX_SAMPLES or MIN_GAP because in both cases it starts searching for new frames. What if one frame has less number of symbols than MIN_GAP and MAX_SAMPLES?
Can anyone please explain this ?