From 91fd255c8638e1cdd3daafe236242a0f8db413c8 Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Thu, 20 Apr 2017 21:19:55 -0400 Subject: [PATCH] Remove temporary windows SSB filtering solution --- src/modules/modem/analog/ModemLSB.cpp | 17 ----------------- src/modules/modem/analog/ModemLSB.h | 6 ------ src/modules/modem/analog/ModemUSB.cpp | 17 ----------------- src/modules/modem/analog/ModemUSB.h | 5 ----- 4 files changed, 45 deletions(-) diff --git a/src/modules/modem/analog/ModemLSB.cpp b/src/modules/modem/analog/ModemLSB.cpp index 140a90a..295a9c4 100644 --- a/src/modules/modem/analog/ModemLSB.cpp +++ b/src/modules/modem/analog/ModemLSB.cpp @@ -5,12 +5,7 @@ ModemLSB::ModemLSB() : ModemAnalog() { // half band filter used for side-band elimination - // demodAM_LSB = ampmodem_create(0.25, 0.25, LIQUID_AMPMODEM_LSB, 1); -#ifdef WIN32 - ssbFilt = firfilt_crcf_create_kaiser(23, 0.25, 90.0, 0.01f); -#else ssbFilt = iirfilt_crcf_create_lowpass(6, 0.25); -#endif ssbShift = nco_crcf_create(LIQUID_NCO); nco_crcf_set_frequency(ssbShift, (float)((2.0 * M_PI) * 0.25)); c2rFilt = firhilbf_create(5, 90.0); @@ -26,14 +21,9 @@ std::string ModemLSB::getName() { } ModemLSB::~ModemLSB() { -#ifdef WIN32 - firfilt_crcf_destroy(ssbFilt); -#else iirfilt_crcf_destroy(ssbFilt); -#endif nco_crcf_destroy(ssbShift); firhilbf_destroy(c2rFilt); - // ampmodem_destroy(demodAM_LSB); } int ModemLSB::checkSampleRate(long long sampleRate, int /* audioSampleRate */) { @@ -64,15 +54,8 @@ void ModemLSB::demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *a for (size_t i = 0; i < bufSize; i++) { // Reject upper band nco_crcf_step(ssbShift); nco_crcf_mix_up(ssbShift, input->data[i], &x); -#ifdef WIN32 - firfilt_crcf_push(ssbFilt, x); - firfilt_crcf_execute(ssbFilt, &y); -#else iirfilt_crcf_execute(ssbFilt, x, &y); -#endif nco_crcf_mix_down(ssbShift, y, &x); - // Liquid-DSP AMPModem SSB drifts with strong signals near baseband (like a carrier?) - // ampmodem_demodulate(demodAM_LSB, y, &demodOutputData[i]); firhilbf_c2r_execute(c2rFilt, x, &demodOutputData[i]); } diff --git a/src/modules/modem/analog/ModemLSB.h b/src/modules/modem/analog/ModemLSB.h index 8834313..9804edf 100644 --- a/src/modules/modem/analog/ModemLSB.h +++ b/src/modules/modem/analog/ModemLSB.h @@ -19,13 +19,7 @@ public: void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut); private: -#ifdef WIN32 - firfilt_crcf ssbFilt; -#else iirfilt_crcf ssbFilt; -#endif firhilbf c2rFilt; nco_crcf ssbShift; - // firfilt_crcf ssbFilt; - // ampmodem demodAM_LSB; }; \ No newline at end of file diff --git a/src/modules/modem/analog/ModemUSB.cpp b/src/modules/modem/analog/ModemUSB.cpp index f221f2c..775fadc 100644 --- a/src/modules/modem/analog/ModemUSB.cpp +++ b/src/modules/modem/analog/ModemUSB.cpp @@ -5,12 +5,7 @@ ModemUSB::ModemUSB() : ModemAnalog() { // half band filter used for side-band elimination - // demodAM_USB = ampmodem_create(0.25, -0.25, LIQUID_AMPMODEM_USB, 1); -#ifdef WIN32 - ssbFilt = firfilt_crcf_create_kaiser(23, 0.25, 90.0, 0.01f); -#else ssbFilt = iirfilt_crcf_create_lowpass(6, 0.25); -#endif ssbShift = nco_crcf_create(LIQUID_NCO); nco_crcf_set_frequency(ssbShift, (float)((2.0 * M_PI) * 0.25)); c2rFilt = firhilbf_create(5, 90.0); @@ -26,14 +21,9 @@ std::string ModemUSB::getName() { } ModemUSB::~ModemUSB() { -#ifdef WIN32 - firfilt_crcf_destroy(ssbFilt); -#else iirfilt_crcf_destroy(ssbFilt); -#endif nco_crcf_destroy(ssbShift); firhilbf_destroy(c2rFilt); - // ampmodem_destroy(demodAM_USB); } int ModemUSB::checkSampleRate(long long sampleRate, int /* audioSampleRate */) { @@ -64,15 +54,8 @@ void ModemUSB::demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *a for (size_t i = 0; i < bufSize; i++) { // Reject lower band nco_crcf_step(ssbShift); nco_crcf_mix_down(ssbShift, input->data[i], &x); -#ifdef WIN32 - firfilt_crcf_push(ssbFilt, x); - firfilt_crcf_execute(ssbFilt, &y); -#else iirfilt_crcf_execute(ssbFilt, x, &y); -#endif nco_crcf_mix_up(ssbShift, y, &x); - // Liquid-DSP AMPModem SSB drifts with strong signals near baseband (like a carrier?) - // ampmodem_demodulate(demodAM_USB, y, &demodOutputData[i]); firhilbf_c2r_execute(c2rFilt, x, &demodOutputData[i]); } diff --git a/src/modules/modem/analog/ModemUSB.h b/src/modules/modem/analog/ModemUSB.h index e7ae61d..7c86ed3 100644 --- a/src/modules/modem/analog/ModemUSB.h +++ b/src/modules/modem/analog/ModemUSB.h @@ -19,12 +19,7 @@ public: void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut); private: -#ifdef WIN32 - firfilt_crcf ssbFilt; -#else iirfilt_crcf ssbFilt; -#endif firhilbf c2rFilt; nco_crcf ssbShift; -// ampmodem demodAM_USB; }; \ No newline at end of file