1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-22 09:31:10 -05:00

ATV Modulator: full SSB support

This commit is contained in:
f4exb 2017-03-15 06:10:39 +01:00
parent fe66703954
commit 13455dfff8
4 changed files with 34 additions and 1 deletions

8
debian/changelog vendored
View File

@ -1,9 +1,15 @@
sdrangel (3.3.1-1) unstable; urgency=medium
* ATV modulator: SSB support
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> 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 <f4exb06@gmail.com> Thu, 02 Mar 2017 23:14:18 +0100
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Wed, 15 Mar 2017 23:14:18 +0100
sdrangel (3.2.0-1) unstable; urgency=medium

View File

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

View File

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

View File

@ -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 &#177;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
<h3>6: RF bandwidth</h3>