squelch . . . #220
-
I've had several cases of squelch flapping open/closed during transmissions. I have noticed it on longer transmissions with strong signals that start cutting in/out towards the end. I've noticed this after the process is up for several days and it seems that restarting the process clears it up, but I can't prove that at this point. I started looking at the squelch code to get an idea what could be happening and it is intertwined with AM/FM demodulation (my changes in #184 didn't help either). I have some observations / questions below, and based on the answers I'll take a pass at refactoring the squelch code and cleaning up what I did with the bandwidth filter.
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Squelch has been implemented by the original author of this program. I hadn't done much to it. Regarding all the constants in the algorithm (except WAVE_RATE) - I guess there isn't a lot of science in them, probably they've been chosen empirically, so that the result sounds good in most scenarios. Feel free to adjust them or modify the algo, but keep in mind that "works for me" is not necessarily the same thing as "works for most people". I recall that there were a few attempts to modify squelch behavior, often by tweaking the constants, but after all things got reverted to the previous state because people complained about the results being worse than before. However I am not particularly attached to the current algorithm - if you have an idea for a better one, then sure, go for it. If it's better, I'll be more than happy to merge it. If it's worse, I'll be more than happy to assign you all the issues that people file about it :-) Small request - whatever you contribute, please do not add more C++ into the mix. The fact that the source files are named .cpp does not make this program written in this language. This is how the original author has named them and compile them, but in fact the only C++ thing there was iostream usage. C++ abstractions are completely unnecessary in low level DSP work that we're doing here. Cleaning this up is on my TODO list, however I'm currently out of bandwidth to work on this. Now to your questions:
|
Beta Was this translation helpful? Give feedback.
-
Once you leave out the "fancy", you end up with things that can be easily done in plain C. Input device modules are an example - *_input_new() is a constructor, static functions are private methods, while the rest is public. Another example with a vtable: https://github.com/szpajder/dumpvdl2/blob/master/src/output-file.c (and other output-*.c files there). There is an interface and a bunch of classes that implement it. The caller does not even know which class it's dealing with - but it doesn't care, it just calls interface methods (pointers to functions). No magic here, it's that simple. |
Beta Was this translation helpful? Give feedback.
-
#230 has a bunch of improvements to the squelch, including detecting and trying to reduce flapping. |
Beta Was this translation helpful? Give feedback.
Squelch has been implemented by the original author of this program. I hadn't done much to it.
Regarding all the constants in the algorithm (except WAVE_RATE) - I guess there isn't a lot of science in them, probably they've been chosen empirically, so that the result sounds good in most scenarios. Feel free to adjust them or modify the algo, but keep in mind that "works for me" is not necessarily the same thing as "works for most people". I recall that there were a few attempts to modify squelch behavior, often by tweaking the constants, but after all things got reverted to the previous state because people complained about the results being worse than before. However I am not particularl…