[fix](trx-backend-soapysdr): match wfm sum/diff filter cutoffs at 18 kHz
Raise both AUDIO_BW_HZ and STEREO_DIFF_BW_HZ to 18 kHz so the L+R and L-R filter paths have identical group delay across the full audio band. The previous mismatch (15.8 vs 14.5 kHz) caused frequency-dependent phase errors in the stereo matrix that degraded real-world separation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -11,14 +11,14 @@ const RDS_BPF_Q: f32 = 10.0;
|
|||||||
/// Pilot tone frequency (Hz).
|
/// Pilot tone frequency (Hz).
|
||||||
const PILOT_HZ: f32 = 19_000.0;
|
const PILOT_HZ: f32 = 19_000.0;
|
||||||
/// Audio bandwidth for WFM (Hz).
|
/// Audio bandwidth for WFM (Hz).
|
||||||
/// 15.8 kHz leaves more guard band below the 19 kHz pilot and reduces
|
/// 18 kHz matches the diff path cutoff so both have identical group delay,
|
||||||
/// top-end artifacts on strong signals while still preserving the useful
|
/// which is required for good stereo separation. The 19 kHz pilot is
|
||||||
/// broadcast audio range.
|
/// removed by the notch filter on the mono path.
|
||||||
const AUDIO_BW_HZ: f32 = 15_800.0;
|
const AUDIO_BW_HZ: f32 = 18_000.0;
|
||||||
/// Stereo L-R subchannel bandwidth for WFM (Hz).
|
/// Stereo L-R subchannel bandwidth for WFM (Hz).
|
||||||
/// Keep this a bit lower than the mono path because the recovered difference
|
/// Wider than the mono path to preserve high-frequency stereo detail; the
|
||||||
/// signal is noisier and more prone to high-frequency artifacts.
|
/// 19 kHz pilot is already removed by the coherent demodulation step.
|
||||||
const STEREO_DIFF_BW_HZ: f32 = 14_500.0;
|
const STEREO_DIFF_BW_HZ: f32 = 18_000.0;
|
||||||
/// Q values for a proper 4th-order Butterworth cascade (two 2nd-order stages).
|
/// Q values for a proper 4th-order Butterworth cascade (two 2nd-order stages).
|
||||||
/// Stage 1: Q = 1 / (2 cos(π/8))
|
/// Stage 1: Q = 1 / (2 cos(π/8))
|
||||||
const BW4_Q1: f32 = 0.5412;
|
const BW4_Q1: f32 = 0.5412;
|
||||||
|
|||||||
Reference in New Issue
Block a user