Once this is all working, you could have get_iq_online() work in a separate
thread so that you don't have to hit the network every time work() is
called. Maybe buffer a small number of frames in a queue.

On Tue, Aug 16, 2022 at 10:13 AM Jeff Long <willco...@gmail.com> wrote:

> Hi Carl,
>
> Use vectors only if data always needs to be grouped in exact quantities,
> e.g., if the GR flowgraph needs to always handle blocks of 2^20 items. In
> general, a 5-channel stream would be more flexible. The variation in the
> number of items would be due to the output buffer sometimes being empty and
> sometimes not. This depends on what is happening in downstream blocks, and
> also on random scheduling of threads. Hope that answers some of your
> questions.
>
> On Tue, Aug 16, 2022 at 9:49 AM Carl Laufer <ad...@rtl-sdr.com> wrote:
>
>> Hi All,
>>
>> I'm currently working on a GNU Radio source block for the KrakenSDR. So
>> far my block mostly seems to work as expected, but I'm having some minor
>> issues and questions.
>>
>> If you didn't know, the KrakenSDR is 5 RTL-SDR receivers, on the same
>> clock with a noise source for coherence calibration of the channels. We're
>> using it for applications like radio direction finding and passive
>> radar, and mostly write our own code in Python. But having a GNU Radio
>> source would be useful for others.
>>
>> With KrakenSDR there is a DAQ software called "heimdall" which handles
>> all the coherent calibration automatically. In my source block, I'm able to
>> successfully receive the data in the GNU Radio source block from heimdall
>> via a socket connection.
>>
>> First so you know, the heimdall DAQ buffers an array of "cpi_size" (cpi =
>> coherent processing interval) IQ data per channel, and outputs those arrays
>> on the socket when it's filled. By default the cpi_size = 2^20. So in my
>> GNU Radio source I'm receiving five, 2^20 long arrays of coherent complex
>> IQ data every ~400ms.
>>
>> I believe in GNU Radio this is considered a vector? So should I make the
>> output of the source block five port vectors, with out_sig=[(np.complex64,
>> cpi_size)] * numChannels and set vlen to cpi_size in the yaml?
>>
>> Or instead should I have it as an output stream out_sig=[np.complex64] *
>> numChannels, and be using Stream->Vector blocks when needed, with num_items
>> set to cpi_size?
>>
>> I've tried both methods, and they both work. But I don't understand why
>> when using the vector output implementation, the shape of output_items
>> keeps flipping between (5, 2, 1048576) and (5, 1, 1048576)?
>>
>> Code is all at https://github.com/krakenrf/gr-krakensdr if anyone would
>> care to take a look. Everything in Python. If anyone has any tips or
>> comments please let me know. Thanks to anyone for your insights.
>>
>> Regards,
>> Carl Laufer
>>
>

Reply via email to