projecthorus / radiosonde_auto_rx

Automatically Track Radiosonde Launches using RTLSDR
GNU General Public License v3.0
476 stars 123 forks source link

Parallelise Scan & Detection stages #359

Open negis02 opened 3 years ago

negis02 commented 3 years ago

Good day, I try to run radiosonde_auto_rx with 2 RTLSDR's. From logs i see that only first allocated RTLSDR doing search for peak and sonde detection job, while another RTLSDR - nothing. Will be nice, if can all connected and free RTLSDR in same time to do search for peaks and then to do sonde detection task.

darksidelemm commented 3 years ago

Hmm.

At the moment each task (Scan, Decode) can really only handle one SDR. Parallelising the scan & detection steps may provide some detection speed improvements, but we would need to be a little careful as the detection stage does use up an entire code when running (dft_detect runs slightly slower than realtime - not really a problem at the moment).

As a simple first-pass of this (just using two SDRs)

There would need to be some limits in how the parallel scans and detections are run. Perhaps instead of a queue, it's just a list which detections are added to if they are not already in the list? (How do we deal with the white/greylist in this situation?)

I'm not sure I have the time to work on this one - If someone wants to give it a crack, I'd suggest starting by making a separate ParallelSondeScanner class: https://github.com/projecthorus/radiosonde_auto_rx/blob/master/auto_rx/autorx/scan.py#L527

You will need to allocate two SDRs to it here: https://github.com/projecthorus/radiosonde_auto_rx/blob/master/auto_rx/auto_rx.py#L131