discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] changes to threhold block


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] changes to threhold block
Date: Mon, 14 Feb 2011 11:51:39 -0500

On Mon, Feb 14, 2011 at 11:29 AM, uday_gnu <address@hidden> wrote:
>
> hello
> I am new to gnu world
> I want to make changes to the threshold block
> I want the threshold block to give out as 3.0 or -3.0 in stead of 1.0 or
> -1.0.
> how can I achieve this?
> also I would to know if there is a possibilty i can achieve this using .py
> script file

I thought threshold outputted 1 or 0. If you want it to output
something else, you could either hack the block itself
(gnuradio-core/src/lib/general/gr_threshold_ff.cc) or add some extra
math blocks after it. The stream is a float, so you could put a
gr_add_const_ff(-0.5), which would convert the output [1 -> 0.5] and
[0 -> -0.5]. The put this into a gr_multiply_const_ff(6) to convert it
to 3 and -3.

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]