SNR estimator block output problem

Hi all,
I try to create a new block able to generate integer values depending on
the
output values giving by the SNR estimator block (already available in
Gnuradio library). Normally the estimator black should give the SNR in
dB so
a float value, but in the C++ file the output is defined as double
(complex). Moreover, the program code contains this line:
double x = abs(input[i+1])
So, I want to understand why x is double and it is not a float? Any help
will be appreciate.
Thanks


View this message in context:
http://gnuradio.4.n7.nabble.com/SNR-estimator-block-output-problem-tp47023.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Mon, Mar 17, 2014 at 10:36 AM, zielalaoui [email protected]
wrote:

Hi all,
I try to create a new block able to generate integer values depending on the
output values giving by the SNR estimator block (already available in
Gnuradio library). Normally the estimator black should give the SNR in dB so
a float value, but in the C++ file the output is defined as double
(complex). Moreover, the program code contains this line:
double x = abs(input[i+1])
So, I want to understand why x is double and it is not a float? Any help
will be appreciate.
Thanks

The running averager used internally is pretty sensitive to the
precision, so we calculate it internally as double precision. You can
cast the result down to a float if you want.

Honestly, we could probably get away with using floats here
considering how rough any real SNR estimate is, anyways.

Tom