From 9370ce0bcd630a73e843d0367be7a2868c35f0e5 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Fri, 4 Jul 2025 08:31:45 +0200 Subject: [PATCH] update channel smoothly --- decode.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/decode.cc b/decode.cc index 9c12cb8..218af28 100644 --- a/decode.cc +++ b/decode.cc @@ -223,10 +223,9 @@ struct Decoder : Common for (int i = 0; i < tone_count; ++i) demod[tone_count*j+i] *= DSP::polar(1, -tse(i+tone_off)); for (int i = 0; i < tone_count; ++i) - if (i % block_length == pilot_off) - chan[i] = tone[i]; - else - chan[i] *= DSP::polar(1, tse(i+tone_off)); + chan[i] *= DSP::polar(1, tse(i+tone_off)); + for (int i = pilot_off; i < tone_count; i += block_length) + chan[i] = DSP::lerp(chan[i], tone[i], value(0.5)); std::cerr << "."; } std::cerr << " done" << std::endl;