# Coding bug in gr-channels/lib/flat\_fader\_impl.cc

**URL:** <https://www.ruby-forum.com/t/coding-bug-in-gr-channels-lib-flat-fader-impl-cc/240645>\
**Category:** GNU Radio\
**Created:** [April 24, 2014, 5:58am UTC](https://www.ruby-forum.com/t/coding-bug-in-gr-channels-lib-flat-fader-impl-cc/240645 "2014-04-24T05:58:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [April 24, 2014, 5:58am UTC](https://www.ruby-forum.com/t/coding-bug-in-gr-channels-lib-flat-fader-impl-cc/240645/1 "2014-04-24T05:58:20Z")

</div>

I believe there is a bug in file gr-channels/lib/flat\_fader\_impl.cc,  
line 67

according to Eq.4 of paper “Improved Models for the Generation of  
Multiple  
Uncorrelated Rayleigh Fading Waveforms” published on IEEE COMMUNICATIONS  
LETTERS, VOL. 6, NO. 6, JUNE 2002,

that line should be changed from:

```
     float alpha_n = (2*M_PI*n - M_PI + d_theta)/4*d_N;

```

to:

```
    float alpha_n = (2*M_PI*n - M_PI + d_theta)/(4*d_N);
```

---

<div class="post-metadata">

**Author:** ![qin\_1921](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/a88e4f/32.png) [@qin\_1921](https://www.ruby-forum.com/u/qin_1921)\
**Post date:** [April 25, 2014, 6:20am UTC](https://www.ruby-forum.com/t/coding-bug-in-gr-channels-lib-flat-fader-impl-cc/240645/2 "2014-04-25T06:20:10Z")

</div>

On Wed, Apr 23, 2014 at 11:57 PM, qin 1921 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> to:
> 
> ```
> float alpha_n = (2*M_PI*n - M_PI + d_theta)/(4*d_N);
> 
> ```

Thanks. Yeah, I think we’re all in agreement on that. We’ll fix this  
today.

This is simple enough for us to handle, but next time, it would be  
really  
helpful to us if you would either create an Issue on [gnuradio.org](http://gnuradio.org) or  
send  
us a pull request with the patch through github.

Thanks!

Tom
