0
$\begingroup$

I am trying to dissecate a large bandwidth into smaller ones and, for each of those smaller bands, see if it contains enough energy to consider that a message is sent in it. To do so, I am thinking of doing it by implementing the following schematic schematic to implement

So far, I have been able to implement everythink, except for the compute threshold block (aimed at updating the threshold of the various threshold blocks). The problem I am facing is that I do not know how to retrieve the value of the different complex_to_mag_squared blocks. Does anyone know how to do this ? Here is the link to the code I have so far.

Thank you and have a nice day, Alex.

$\endgroup$
9
  • $\begingroup$ There's nothing to "retrieve" - they just output magnitude squares on their output. You connect your block to that. $\endgroup$ Commented Mar 8, 2022 at 9:15
  • $\begingroup$ Thank you for your answer @MarcusMüller, I will try by simple connection. Have a nice day, Alex $\endgroup$
    – aheuchamps
    Commented Mar 8, 2022 at 9:20
  • $\begingroup$ @MarcusMüller I tried to just print the values given by the complex_to_mag_squared block, and was expecting to see some float values. Insted, I got something like this all_cmpl_to_mag2[0] = <gr_block complex_to_mag_squared (4)>. I do not understand how to get the value from there ? $\endgroup$
    – aheuchamps
    Commented Mar 8, 2022 at 9:36
  • $\begingroup$ you did not print values, you printed a block. Not how GNU Radio works! The samples are not available at the level where you construct the flow graph – you only interact with them using blocks. So, you need to write a block. tutorials.gnuradio.org has a good introduction to doing that :) $\endgroup$ Commented Mar 8, 2022 at 9:36
  • $\begingroup$ @MarcusMüller oh okay I thought it was like that I had to do. I am going to search how to access the value rather than access the whole block. Thank you for your answer :D $\endgroup$
    – aheuchamps
    Commented Mar 8, 2022 at 9:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.