-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add high and low pass filter parameters #112
Conversation
Thanks, merged into unstable branch (this is where the new code lands first). |
Handy for filtering out CTCSS. |
Woot, just got pinged about this, trying it now! |
@clydebarrow thanks for PR, I tried unstable branch but looks like squelch is working not so good. |
@vitaliy-sk I've not seen any issues with the squelch. Is it spuriously opening and closing in the presence or absence of signal? |
@clydebarrow mostly in presence of the signal. I'll try to play with gain but looks like on master branch I don't have this issue with same config |
Filtering does not affect squelch operation, as it's done way after squelch
is performed.
Squelch behavior was slightly modified in unstable to fix issue described
in
#84 (comment)
.
|
@szpajder thanks for the clarification some examples below maybe it's possible to cherry-pick commits filters to release? |
@vitaliy-sk your recording has a high amount of background noise, which means the reception is weak. If you browse previous issues here on Github, you may notice that people tend to have contradicting expectations on how the squelch should behave when the signal is just above the noise level. Users who primarily use scanning want the squelch to react quickly, otherwise the scanner gets blocked frequently just by fluctuations of the noise level. Whoever uses multichannel mode, prefers the squelch to act lazily in such cases, because they don't want it to open and close too often. So there is no one-size fits-all solution and I'd rather not revert the abovementioned tweak to the squelch algorithm, because blocking the scanner by a lazy squelch is a major inconvenience, while the effect you are describing can in most cases be fixed by using manual squelch feature and setting it a bit lower than what auto squelch would do. |
@szpajder thanks for the detailed explanation |
First of all, check the textual waterfalls (run the program with -f option to see them) and verify if the noise level in your channels is not near zero (noise level is the number after the '/' character in the waterfall). If it's very low (like 1-3), then increase the RTL gain. I typically run my dongles at the noise level between 8 and 13. This is when automatic squelch works best. If it won't help, then enable manual squelch (see https://github.com/szpajder/RTLSDR-Airband/wiki/Manual-squelch-setting#how-to-find-the-proper-squelch-value). You can go as low with it as you wish, but at some point it will start opening all the time due to noise level fluctuations, so don't overdo it. |
@szpajder thanks I played little bit with unstable branch and I guess that the same condition conditions for open and close could be a root cause
so in case when I tried to collect some example, but it's not so easy to debug.
Transimition
|
So could you please modify this line in rtl_airband.cpp:
```C
if ((channel->agcsq == -1 && fparms->agcavgslow < sqlevel) ||
fparms->agclow == AGC_EXTRA - 12) {
```
to something like:
```C
if ((channel->agcsq == -1 && fparms->agcavgslow < 0.8f * sqlevel)
|| fparms->agclow == AGC_EXTRA - 12) {
```
and verify if it works any better? Thanks in advance.
|
@szpajder I tried it's working slightly better, but issue still present then I removed Few minutes record with log (without |
This PR adds config parameters (in a channel spec) for high and low-pass filtering of the audio. The defaults are 100-2500Hz. This significantly improves the audio quality by suppressing high frequency noise. Setting the low or high pass values to 0 will replicate current behaviour (automatic selection by Lame) and -1 will disable the filter.
Example config: