# Ofdm\_chanest\_vcvc\_impl.cc

**URL:** <https://www.ruby-forum.com/t/ofdm-chanest-vcvc-impl-cc/233949>\
**Category:** GNU Radio\
**Created:** [January 24, 2015, 8:52am UTC](https://www.ruby-forum.com/t/ofdm-chanest-vcvc-impl-cc/233949 "2015-01-24T08:52:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [January 24, 2015, 8:52am UTC](https://www.ruby-forum.com/t/ofdm-chanest-vcvc-impl-cc/233949/1 "2015-01-24T08:52:56Z")

</div>

Hi all:  
Thank you in advance.I have read the source  
code:ofdm\_chanest\_vcvc\_impl.cc.But i have a question.

```
void
ofdm_chanest_vcvc_impl::get_chan_taps(
const gr_complex *sync_sym1,
const gr_complex *sync_sym2,
int carr_offset,
std::vector<gr_complex> &taps)
{
  const gr_complex *sym = ((d_n_sync_syms == 2) ? sync_sym2 : 

```

sync\_sym1);  
std::fill(taps.begin(), taps.end(), gr\_complex(0, 0));  
int loop\_start = 0;  
int loop\_end = d\_fft\_len;  
if (carr\_offset \> 0) {  
loop\_start = carr\_offset;  
} else if (carr\_offset \< 0) {  
loop\_end = d\_fft\_len + carr\_offset;  
}

```
  for (int i = loop_start; i < loop_end; i++) {
if ((d_ref_sym[i-carr_offset] != gr_complex(0, 0))) {
  taps[i-carr_offset] = sym[i] / d_ref_sym[i-carr_offset];
}
  }

```

//Question:  
//For example,when the carr\_offset=2,then:  
//loop\_start =2;  
//for example loop\_end=64  
// for (int i =2; i \< loop\_end; i++) {  
if ((d\_ref\_sym[i-carr\_offset] != gr\_complex(0, 0))) {  
taps[i-carr\_offset] = sym[i] / d\_ref\_sym[i-carr\_offset];  
}  
}  
//  
Now the taps only have values on taps[0]—taps[63-2],and taps[62]  
taps[63] will be equal to zero.It means that the channel estimation have  
value 0.It is wrong?

```
  if (d_interpolate) {
for (int i = d_first_active_carrier + 1; i < d_last_active_carrier; 

```

i += 2) {  
taps[i] = taps[i-1];  
}  
taps[d\_last\_active\_carrier] = taps[d\_last\_active\_carrier-1];  
}

```
  if (d_eq_noise_red_len) {
// TODO
// 1) IFFT
// 2) Set all elements > d_eq_noise_red_len to zero
// 3) FFT
  }
}
        Thank you.

```

Best regards,  
zswx
