[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] OOT Module Not Working Properly
From: |
Jeff Long |
Subject: |
Re: [Discuss-gnuradio] OOT Module Not Working Properly |
Date: |
Fri, 12 Jan 2018 06:18:41 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
Noise amplitude is 1.0, so you are generating a lot of noise.
The following two lines in your block are not right. 'c' is computed but
not used. 'i' is the original value, not the log. Not sure about the
scaling factor (1024).
#converts 1024 values stored in in1 to dB and stores them in c
c = math.log10(i/1024)
#checks if any of the values stored in c are greater than a threshold value
if i > 70:
On 01/12/2018 02:47 AM, Tellrell White wrote:
Hello Guys
I'm creating a customized block in the GNU Radio framework using python
that takes in a number of input items and once that number of input
items surpasses a certain number, 1024 of the input items are taken and
stored into an array, and then those items are converted to dB and
lastly compared to a threshold value, 5 in this case. If any of the
values are greater than the threshold value, a message is printed
indicating a signal is present, and if none of the values are greater
than 5, this is indicated with a message stating "No signal is present".
In the flow graph attached, I'm using a cosine source and a gaussian
noise source to test my block in two different scenarios.
In scenario 1, I run the flow graph with both signal sources and I
expect to receive a message stating "A signal is present" because the
power of the signal will be greater than the threshold.
In scenario 2, the cosine source is disabled and only the noise source
is runing. In this scenario I expect to get a message indicating no
signal is present because the calculated power will be lower than the
threshold.
Scenario 1 works, however, scenario 2 doesn't work no matter how high I
raise the threshold value and, at this point, I'm not quite sure as to why.
Any help would be appreciated. Both the .py script for the oot block and
the .grc file are included.
Tellrell
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio