From 68edf32cd7838ca6420438ffbb6cad852f21a09d Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 15 Jan 2022 02:23:14 +0100 Subject: [PATCH] Removed unused symbol synchronization object and irrelevant references to liquidsdr. Fixes #1104 --- sdrbase/dsp/spectrummarkers.cpp | 3 -- sdrbase/dsp/spectrummarkers.h | 3 -- sdrbase/dsp/spectrumvis.cpp | 3 -- sdrbase/dsp/spectrumvis.h | 3 -- sdrbase/dsp/symsync.cpp | 96 --------------------------------- sdrbase/dsp/symsync.h | 39 -------------- 6 files changed, 147 deletions(-) delete mode 100644 sdrbase/dsp/symsync.cpp delete mode 100644 sdrbase/dsp/symsync.h diff --git a/sdrbase/dsp/spectrummarkers.cpp b/sdrbase/dsp/spectrummarkers.cpp index ac95c4f54..5a497c694 100644 --- a/sdrbase/dsp/spectrummarkers.cpp +++ b/sdrbase/dsp/spectrummarkers.cpp @@ -1,9 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2021 Edouard Griffiths, F4EXB // // // -// Symbol synchronizer or symbol clock recovery mostly encapsulating // -// liquid-dsp's symsync "object" // -// // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation as version 3 of the License, or // diff --git a/sdrbase/dsp/spectrummarkers.h b/sdrbase/dsp/spectrummarkers.h index 02d601c2d..00b90f2ca 100644 --- a/sdrbase/dsp/spectrummarkers.h +++ b/sdrbase/dsp/spectrummarkers.h @@ -1,9 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2021 Edouard Griffiths, F4EXB // // // -// Symbol synchronizer or symbol clock recovery mostly encapsulating // -// liquid-dsp's symsync "object" // -// // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation as version 3 of the License, or // diff --git a/sdrbase/dsp/spectrumvis.cpp b/sdrbase/dsp/spectrumvis.cpp index 093a157c5..a0fd79a0b 100644 --- a/sdrbase/dsp/spectrumvis.cpp +++ b/sdrbase/dsp/spectrumvis.cpp @@ -1,9 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2015-2020 Edouard Griffiths, F4EXB // // // -// Symbol synchronizer or symbol clock recovery mostly encapsulating // -// liquid-dsp's symsync "object" // -// // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation as version 3 of the License, or // diff --git a/sdrbase/dsp/spectrumvis.h b/sdrbase/dsp/spectrumvis.h index 26194ab81..5a3a16ac7 100644 --- a/sdrbase/dsp/spectrumvis.h +++ b/sdrbase/dsp/spectrumvis.h @@ -1,9 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2015-2020 Edouard Griffiths, F4EXB // // // -// Symbol synchronizer or symbol clock recovery mostly encapsulating // -// liquid-dsp's symsync "object" // -// // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation as version 3 of the License, or // diff --git a/sdrbase/dsp/symsync.cpp b/sdrbase/dsp/symsync.cpp deleted file mode 100644 index d523c3421..000000000 --- a/sdrbase/dsp/symsync.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2018 Edouard Griffiths, F4EXB // -// // -// Symbol synchronizer or symbol clock recovery mostly encapsulating // -// liquid-dsp's symsync "object" // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation as version 3 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License V3 for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program. If not, see . // -/////////////////////////////////////////////////////////////////////////////////// - -#include "symsync.h" - -SymbolSynchronizer::SymbolSynchronizer() -{ - // For now use hardcoded values: - // - RRC filter - // - 4 samples per symbol - // - 5 symbols delay filter - // - 0.5 filter excess bandwidth factor - // - 32 filter elements for the internal polyphase filter - m_sync = symsync_crcf_create_rnyquist(LIQUID_FIRFILT_RRC, 4, 5, 0.5f, 32); - // - 0.02 loop filter bandwidth factor - symsync_crcf_set_lf_bw(m_sync, 0.01f); - // - 4 samples per symbol output rate - symsync_crcf_set_output_rate(m_sync, 4); - m_syncSampleCount = 0; -} - -SymbolSynchronizer::~SymbolSynchronizer() -{ - symsync_crcf_destroy(m_sync); -} - -Real SymbolSynchronizer::run(const Sample& s) -{ - unsigned int nn; - Real v = -1.0f; - liquid_float_complex y = (s.m_real / SDR_RX_SCALEF) + (s.m_imag / SDR_RX_SCALEF)*I; - symsync_crcf_execute(m_sync, &y, 1, m_z, &nn); - - for (unsigned int i = 0; i < nn; i++) - { - if (nn != 1) { - qDebug("SymbolSynchronizer::run: %u", nn); - } - - if (m_syncSampleCount % 4 == 0) { - v = 1.0f; - } - - if (m_syncSampleCount < 4095) { - m_syncSampleCount++; - } else { - qDebug("SymbolSynchronizer::run: tau: %f", symsync_crcf_get_tau(m_sync)); - m_syncSampleCount = 0; - } - } - - return v; -} - -liquid_float_complex SymbolSynchronizer::runZ(const Sample& s) -{ - unsigned int nn; - liquid_float_complex y = (s.m_real / SDR_RX_SCALEF) + (s.m_imag / SDR_RX_SCALEF)*I; - symsync_crcf_execute(m_sync, &y, 1, m_z, &nn); - - for (unsigned int i = 0; i < nn; i++) - { - if (nn != 1) { - qDebug("SymbolSynchronizer::run: %u", nn); - } - - if (m_syncSampleCount == 0) { - m_z0 = m_z[i]; - } - - if (m_syncSampleCount < 3) { - m_syncSampleCount++; - } else { - m_syncSampleCount = 0; - } - } - - return m_z0; -} diff --git a/sdrbase/dsp/symsync.h b/sdrbase/dsp/symsync.h deleted file mode 100644 index c86450a56..000000000 --- a/sdrbase/dsp/symsync.h +++ /dev/null @@ -1,39 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2018 Edouard Griffiths, F4EXB // -// // -// Symbol synchronizer or symbol clock recovery mostly encapsulating // -// liquid-dsp's symsync "object" // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation as version 3 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License V3 for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program. If not, see . // -/////////////////////////////////////////////////////////////////////////////////// - -#include "dsp/dsptypes.h" -#include "liquid.h" -#include - -class SymbolSynchronizer -{ -public: - SymbolSynchronizer(); - ~SymbolSynchronizer(); - - Real run(const Sample& s); - liquid_float_complex runZ(const Sample& s); - -private: - symsync_crcf m_sync; - liquid_float_complex m_z[4+4]; // 4 samples per symbol. One symbol plus extra space - liquid_float_complex m_z0; - int m_syncSampleCount; -};