Re: [Discuss-gnuradio] Dealing with `divide 0` or `Inf` in GNU Radio C++ code.

2015-08-20 Thread Ludwig Stephan (CR/AEH4)
Hi Jeff, you could use a strcture like this MA_divisor = Divide: % =multiply = pad sink. |- threshold detector-^ i.e. take the divisor path in parallel into threshold detector and use the output (in {0,1}) in a multiplier for masking the dividing by zero cases. By

Re: [Discuss-gnuradio] Dealing with `divide 0` or `Inf` in GNU Radio C++ code.

2015-08-19 Thread Jeff Long
Jeon, You can add an appropriate constant before the divide and compensate for it afterward. The exact math will depend on the values coming out of the correlators. Jeff On 08/19/2015 06:50 AM, Jeon wrote: Let's think about the following auto/cross correlator:

Re: [Discuss-gnuradio] Dealing with `divide 0` or `Inf` in GNU Radio C++ code.

2015-08-19 Thread Jeff Long
(That should be moving averages, not correlators). Also, subtracting instead of dividing might do what you want. Jeff On 08/19/2015 07:25 AM, Jeff Long wrote: Jeon, You can add an appropriate constant before the divide and compensate for it afterward. The exact math will depend on the values

[Discuss-gnuradio] Dealing with `divide 0` or `Inf` in GNU Radio C++ code.

2015-08-19 Thread Jeon
Let's think about the following auto/cross correlator: http://i.imgur.com/Fy5hdVj.png I've placed `divide` because I need to normalize the correlation result. If we place `null source`, or `constant source with value of zero` right before the `pad source`, the simplified form of the correlator