So how would you represent this expression so that it evaluates as floating
point:
As the "Delay" variable in a delay block:  Phase * (SampleRate/360)


On Tue, Jan 22, 2019 at 5:59 AM david vanhorn <kc6...@gmail.com> wrote:

> Nope.
>
> 1/Averaging evaluates to zero.
> 1/Averaging. (trailing period) does not evaluate, either in the Moving
> Average parameters, or as a separate variable.
>
>
> On Mon, Jan 21, 2019 at 11:00 PM Cinaed Simson <cinaed.sim...@gmail.com>
> wrote:
>
>> 1/5 is zero using integer division in python.
>>
>> Try using float division
>>
>>  1/4000.
>>  1/5.
>>
>> -- Cinaed
>>
>>
>> On 1/21/19 4:41 PM, david vanhorn wrote:
>> > The docs say that I need to set Scale to the inverse of the Length.
>> > Ok, I interpret that as Length = 4000 and Scale = 1/4000
>> > The docs here:
>> >
>> https://www.gnuradio.org/doc/doxygen/classgr_1_1blocks_1_1moving__average__ff.html
>> > says that Scale is a float.
>> >
>> > The discussion here clearly shows Scale working for values <1 and >0
>> >
>> https://lists.gnu.org/archive/html/discuss-gnuradio/2016-01/msg00084.html
>> >
>> > If I enter a scale value by hand, like 0.2, then I see 200m which is
>> > what I expect.
>> > If I enter a scale value as (1/5) then I see 0.
>> > If I set a variable called "Scale" = (1/) and enter "Scale" in the Scale
>> > field of the moving average, it evaluates to 0.
>> >
>> >
>> > When I enter the values in the block, it looks like scale is an int,
>> > which makes 1/4000 or indeed 1/(>1) problematic in that it always
>> > evaluates to zero, which kinda breaks things.
>> > When I enter 1/2 I get "0"
>> >
>> > When I hover over the field to enter Scale, I get Type Real.
>> >
>> > I have the input and output of my integrator connected to a QT GUI Time
>> > Sink, and while the input waveform is what I expect, if I have any <1
>> > Scale parameter, the output is 0.
>> >
>> >
>> > Is something broken here, or is it me?
>> > I've not had any problems using simple math in any of the other fields
>> > where appropriate.
>> >
>> >
>> > --
>> > K1FZY (WA4TPW) SK  9/29/37-4/13/15
>> >
>> > _______________________________________________
>> > Discuss-gnuradio mailing list
>> > Discuss-gnuradio@gnu.org
>> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>> >
>>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> Discuss-gnuradio@gnu.org
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>
>
> --
> K1FZY (WA4TPW) SK  9/29/37-4/13/15
>


-- 
K1FZY (WA4TPW) SK  9/29/37-4/13/15
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to