[feat](trx-rs): add configurable noise blanker for SoapySDR backend

IQ-domain impulse noise blanker using exponential-smoothing RMS tracker. Samples exceeding threshold × running RMS are replaced with the last clean sample. Configurable via [sdr.noise_blanker] in TOML config and runtime via POST /set_sdr_noise_blanker API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-22 13:54:17 +01:00
parent 01a6b331f6
commit 189d27bac8
15 changed files with 288 additions and 2 deletions
+4
View File
@@ -316,6 +316,8 @@ mod tests {
sdr_agc_enabled: None,
sdr_squelch_enabled: None,
sdr_squelch_threshold_db: None,
sdr_nb_enabled: None,
sdr_nb_threshold: None,
wfm_deemphasis_us: 75,
wfm_stereo: true,
wfm_stereo_detected: false,
@@ -358,6 +360,8 @@ mod tests {
sdr_agc_enabled: None,
sdr_squelch_enabled: None,
sdr_squelch_threshold_db: None,
sdr_nb_enabled: None,
sdr_nb_threshold: None,
wfm_deemphasis_us: 50,
wfm_stereo: true,
wfm_stereo_detected: true,
+6
View File
@@ -65,6 +65,9 @@ pub fn client_command_to_rig(cmd: ClientCommand) -> RigCommand {
enabled,
threshold_db,
},
ClientCommand::SetSdrNoiseBlanker { enabled, threshold } => {
RigCommand::SetSdrNoiseBlanker { enabled, threshold }
}
ClientCommand::SetWfmDeemphasis { deemphasis_us } => {
RigCommand::SetWfmDeemphasis(deemphasis_us)
}
@@ -128,6 +131,9 @@ pub fn rig_command_to_client(cmd: RigCommand) -> ClientCommand {
enabled,
threshold_db,
},
RigCommand::SetSdrNoiseBlanker { enabled, threshold } => {
ClientCommand::SetSdrNoiseBlanker { enabled, threshold }
}
RigCommand::SetWfmDeemphasis(deemphasis_us) => {
ClientCommand::SetWfmDeemphasis { deemphasis_us }
}
+1
View File
@@ -48,6 +48,7 @@ pub enum ClientCommand {
SetSdrLnaGain { gain_db: f64 },
SetSdrAgc { enabled: bool },
SetSdrSquelch { enabled: bool, threshold_db: f64 },
SetSdrNoiseBlanker { enabled: bool, threshold: f64 },
SetWfmDeemphasis { deemphasis_us: u32 },
SetWfmStereo { enabled: bool },
SetWfmDenoise { level: WfmDenoiseLevel },