[Top][All Lists]

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

Re: [Discuss-gnuradio] trig function in grc variable

From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] trig function in grc variable
Date: Sat, 01 Jun 2019 16:52:08 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 06/01/2019 04:16 PM, d.des wrote:
I want to add a phase shift block to a grc flowgraph that is controlled
by a scrollbar. Searching for "phase shift block" returns several
suggestions from several years ago to use the "Multiply Const" block
with the argument: "math.cos(angle), math.sin(angle)" in the "const"
field. If I try that I get the error:

Expression None is invalid for type 'complex'.

I can enter fixed complex variables or references to other variables or
parameters, I just can't do trig functions. I'm currently using the
equation: "pow(10,snr/20.)" in a Noise Source block and it understands
that just fine. Is there a way to do trig functions in a block field?

I'm currently using a clean install and build of gnuradio retrieved
from git a few days ago, but this issue has been the case for the
several versions I've retrieved and built over the past year or so. I
ended up building a hier block with complex_to_magphase, add constant,
and the magphase_to_complex but that seems very inefficient. The
transcendental function seems to be oriented to streams rather than
constants that rarely change. I also considered an OOT block but that
also seems like overkill. Surely I'm missing something really simple.


Just make sure that you import "math" in an import block.

reply via email to

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