Updates: @ Michael I followed your advice and "vectorized" the complex to mag^2 block creating a variable for vector length equal to 1024, which I set as the vector length of this block. I noticed that this changed the color of the output port of the block.
Next, I "vectorized" the custom ED block as well. One question I do have is is there a way to find out the length of the input vector that is passed to the block just to confirm that there are 1024 values being passed? I checked the length of the input_items used in the work function and it prints 1, which I'm assuming is equal to an array of length 1024 since this is the vector length parameter i set in the ED block and also, because this is the vector length I set for the complex to mag^2 block as well. As a result of making these changes to the custom block, now, I'm simply taking the array of input_items, normalizing them, and then comparing to a threshold as before. I'm assuming this is all that needs to be done assuming the block is taking in vectors of length 1024. @Marcus I think your question does warrant some consideration and perhaps is the better approach. Besides this approach being easier, and I'm assuming less of a strain on the cpu are there any other reasons for this approach? I've attached an updated flow graph used for testing On Mon, Feb 12, 2018 at 11:36 AM, Müller, Marcus (CEL) <muel...@kit.edu> wrote: > Just another thought: Why convert every single FFT output vector from > linear to dB with a logarithm (that's a very complicated function!) > just to then compare it to a threshold, if you could also just convert > the threshold to linear once? > > Best regards, > Marcus > On Mon, 2018-02-12 at 10:21 -0500, Michael Dickens wrote: > > In GRC, you open the "complex to ||^2" block settings & set the vector > length to whatever you want. I'd advise using a variable that's defined in > GRC, and then use it for any blocks that require the vector setting; that > way you can change the variable value & all blocks are updated with it. > Hope this is useful. - MLD > > > > On Mon, Feb 12, 2018, at 10:17 AM, Tellrell White wrote: > > > Thanks for the response. That's exactly what I'm trying to > accomplish. You mention the "complex to ||^2 can be vectorized. My > question is how exactly do you go about doing that? > > > > _______________________________________________ > > Discuss-gnuradio mailing list > > Discussemail@example.com > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Description: Binary data
_______________________________________________ Discuss-gnuradio mailing list Discussfirstname.lastname@example.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio