multichannel improvements? #254
Replies: 5 comments
-
It actually doesn't. The SDR is always retuned to a frequency which is 20 FFT bins higher than the current frequency on the freq list. I assume this is the thing that you want to improve to gain some scanning speed, correct?
Obviously this sounds fine, however the devil is in the details.
In order for the scanning tode to be able to find out whether all frequencies in the current virtual channel are idle, there has to be a code which actually computes noise levels and signal levels for each frequency in the virtual channel. So first we need to rethink what a channel actually is. Right now it is a fixed spot in the spectrum (ie. a specific FFT bin) from where a single audio stream is produced and routed to a set of outputs. What it should be is a set of bins rather than a single bin.
But you don't want different outputs per frequency, you want a single output for everything. It's a scanner, after all. Many frequencies (at most one at a time) -> common output. So the given set of bins shall result in a single stream containing audio from at most one active bin - let's say there would be a loop over a set of bins and the first one that Obviously the bin set for every stepped centerfreq would be different, so the scanner controller thread would need to switch both centerfreq and bin set for the channel, so that the demodulating thread would pick the signal from correct bins.
I see some pitfalls in this approach. Would virtual devices be handled by the demodulate thread in the same way as real ones (ie in the same loop)? If yes, then extra care would be needed in case when multithreaded demodulation is enabled - all the virtual devices associated with a common real device would need to be handled by a common thread. Another issue is that the demodulation thread couldn't simply iterate over the whole set of virtual devices and do its work on each of them. It would need to pick the exact one that corresponds to the centerfreq to which the SDR is currently tuned. And what's more, all channels from all virtual devices would need to produce audio to a common output - an approach which is completely opposite to the current design, where every channel has its own set of outputs that are not shared between channels (unless they happen to be mixers). All in all, this approach looks excessively complicated. |
Beta Was this translation helpful? Give feedback.
-
|
I think I made some assumptions on why someone would use I have a single SDR with a 2.4 MHz bandwidth and I want to monitor a total of 5 frequencies, 3 frequencies between 151.0 MHz - 152.0 MHz and 2 frequencies between 158.0 MHz - 159.0 MHz. Today I can achieve this using In my situation two of the frequencies in the lower band are often active at the same time, and while So my problem statement is this: "How can I maximize the amount of captured audio across multiple frequencies when those frequencies span more than a single device's Based on the comments above it sounds like What I am proposing then is some new mode where one can define multiple channels with frequencies that can span more than a device's
To accomplish this I was thinking at configuration time to step through all the channel frequencies and find some minimal set of groupings such that each channel is in one and only one group, and all frequencies in that group are within Going back to my example I would end up with one device with a With this (hopefully better) description I'll try to address the points / concerns:
Yes. Virtual devices would be included in
Fair. I don't see this as a hard requirement, but would make it easier to coordinate when to switch a physical device to the next virtual device.
I was actually thinking of moving that business logic up. Similar to how the re-tuning happens in Under this approach the demodulate thread doesn't really need to know anything about if a device is physical or virtual, it just operates on devices that have samples available and skips devices that do not.
This is not my intent / desire, and I think is confused by me calling it a scanner mode 😄. I actually want each channel to have its own outputs. |
Beta Was this translation helpful? Give feedback.
-
|
OK, it makes sense now. And indeed it's quite different to the current The mode that you are describing is in fact a generalization of the multichannel mode and can be implemented as such. If the device is configured to work in multichannel mode and:
[1] I'm not sure if having full automation here is a good idea. It would be convenient and would probably work correctly most of the time, but could also fail miserably in corner cases. For example, if a particular channel group is clustered around 151.5 MHz and there is a strong blocker at, let's say, 152.5 MHz, I would prefer to manually tune the radio as low as possible to dodge it - for example, to 150.5 rather than 151.5. But dismissing such problems with "buy more dongles" explanation is also a valid solution :-)
OK, sounds good. |
Beta Was this translation helpful? Give feedback.
-
|
OK, cool, I'll find some time in the next few weeks to work on it. I like the idea of not calling it a new mode, rather logic that is triggered if |
Beta Was this translation helpful? Give feedback.
-
|
(also changed the title of this thread from "scan improvements" to "multichannel improvements") |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Scanning is currently achieved by putting a device in
scanmode then creating a single channel with multiple frequencies. Frequencies are stepped through in order, waiting for each to go idle for a fixed period of time before moving to the next.This approach does not leverage the possibility that multiple frequencies may be within the same
bandwidthrange and could be processed in parallel. The current code does check if the next frequency is in the currentbandwidthto skip the re-tune, but does not process frequencies in parallel.Take for example wanting to scan 3 frequencies between 151.0 MHz - 152.0 MHz and an additional 2 frequencies between 158.0 MHz - 159.0 MHz using a device with a 2 MHz bandwidth. The current approach would treat all 5 frequencies the same and check them in sequence. A more efficient approach would be to group the 3 channels in the 151 block and process them a the same time, then once they are all idle, re-tune and process the 2 frequencies in the 158 block at the same time, then repeat.
This could be achieved by leaving the current
scanmode config as-is then putting logic in the configuration code to break down the set of frequencies to be scanned into multiple virtual channels, each channel having a calculated center frequency the covers some sub-set of the frequencies to be scanned. The scanning code would then check that all frequencies in the current virtual channel are idle, re-tune the SDR, and connect the output to the next virtual channel.A disadvantage to doing this with the current
scanmode config is there isnt a way to have different outputs per frequency, so if there are multiple active frequencies in one virtual channel they will step on each other.Another option would be to model functionality on the
multichannelmode config and create virtual devices. Under this approach virtual devices would have their owncenterfreq,bandwidth, and set ofchannelsand the scanning code would be responsible for re-tuning / connecting the physical device to the next virtual device once all the channels are idle.Going down the real vs virtual device path, one could go so far has have multiple physical devices that are stepping through providing input to multiple virtual devices.
@szpajder let me know your thoughts and any concerns / issues with either of these approaches. If this is something worth doing I'll take a crack at it over the next few weeks.
Beta Was this translation helpful? Give feedback.
All reactions