diff --git a/debian/changelog b/debian/changelog index 2b578a4f5..f380a68cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,15 @@ +sdrangel (3.3.1-1) unstable; urgency=medium + + * ATV modulator: SSB support + + -- Edouard Griffiths, F4EXB Thu, 16 Mar 2017 23:14:18 +0100 + sdrangel (3.3.0-1) unstable; urgency=medium * NFM demod: new discriminator and optional FM deviation based squelch * ATV modulator - -- Edouard Griffiths, F4EXB Thu, 02 Mar 2017 23:14:18 +0100 + -- Edouard Griffiths, F4EXB Wed, 15 Mar 2017 23:14:18 +0100 sdrangel (3.2.0-1) unstable; urgency=medium diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index abdfcff08..70bd76e8e 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -188,6 +188,11 @@ void ATVMod::modulateSample() m_modSample.real(cos(m_modPhasor) * 29204.0f); // -1 dB m_modSample.imag(sin(m_modPhasor) * 29204.0f); break; + case ATVModulationLSB: + case ATVModulationUSB: + m_modSample = modulateSSB(t); + m_modSample *= 29204.0f; + break; case ATVModulationAM: // AM 90% default: m_modSample.real((t*1.8f + 0.1f) * 16384.0f); // modulate and scale zero frequency carrier @@ -195,6 +200,25 @@ void ATVMod::modulateSample() } } +Complex& ATVMod::modulateSSB(Real& sample) +{ + int n_out; + Complex ci(sample, 0.0f); + fftfilt::cmplx *filtered; + + n_out = m_SSBFilter->runSSB(ci, &filtered, m_running.m_atvModulation == ATVModulationUSB); + + if (n_out > 0) + { + memcpy((void *) m_SSBFilterBuffer, (const void *) filtered, n_out*sizeof(Complex)); + m_SSBFilterBufferIndex = 0; + } + + m_SSBFilterBufferIndex++; + + return m_SSBFilterBuffer[m_SSBFilterBufferIndex-1]; +} + void ATVMod::pullVideo(Real& sample) { int iLine = m_lineCount % m_nbLines2; diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index bceebd43d..5a804e23b 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -547,6 +547,7 @@ private: void pullVideo(Real& sample); void calculateLevel(Real& sample); void modulateSample(); + Complex& modulateSSB(Real& sample); void applyStandard(); void openImage(const QString& fileName); void openVideo(const QString& fileName); diff --git a/plugins/channeltx/modatv/readme.md b/plugins/channeltx/modatv/readme.md index 4b089fcbe..b8f876907 100644 --- a/plugins/channeltx/modatv/readme.md +++ b/plugins/channeltx/modatv/readme.md @@ -34,6 +34,8 @@ The video signal can modulate the carrier in the following modes: - AM: Amplitude modulation. Modulation index is 90%. - FM: Frequency modulation. Excursion is half the bandwidth available given the channel sample rate. e.g. for 4 MS/s sample rate this is ±1 MHz (2 MHz total) + - USB: SSB upper side band: video signal is transposed only in positive frequencies including DC component + - LSB: SSB lower side band: video signal is transposed only in megative frequencies excluding DC component

6: RF bandwidth