Remove temporary windows SSB filtering solution

This commit is contained in:
Charles J. Cliffe 2017-04-20 21:19:55 -04:00
parent 43ed37b23c
commit 91fd255c86
4 changed files with 0 additions and 45 deletions

View File

@ -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]);
}

View File

@ -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;
};

View File

@ -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]);
}

View File

@ -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;
};