mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
ATV modulator: corrected FM modulation
This commit is contained in:
parent
a5c5790b6f
commit
1d2bcf95f5
@ -178,9 +178,9 @@ void ATVModSource::modulateSample()
|
|||||||
switch (m_settings.m_atvModulation)
|
switch (m_settings.m_atvModulation)
|
||||||
{
|
{
|
||||||
case ATVModSettings::ATVModulationFM: // FM half bandwidth deviation
|
case ATVModSettings::ATVModulationFM: // FM half bandwidth deviation
|
||||||
m_modPhasor += (t - 0.5f) * m_settings.m_fmExcursion * 2.0f * M_PI;
|
m_modPhasor += (t - 0.5f) * m_settings.m_fmExcursion * M_PI;
|
||||||
if (m_modPhasor > 2.0f * M_PI) m_modPhasor -= 2.0f * M_PI; // limit growth
|
if (m_modPhasor > 2.0f * M_PI) m_modPhasor -= 2.0f * M_PI; // limit growth
|
||||||
if (m_modPhasor < 2.0f * M_PI) m_modPhasor += 2.0f * M_PI; // limit growth
|
if (m_modPhasor < 0) m_modPhasor += 2.0f * M_PI; // limit growth
|
||||||
m_modSample.real(cos(m_modPhasor) * m_settings.m_rfScalingFactor); // -1 dB
|
m_modSample.real(cos(m_modPhasor) * m_settings.m_rfScalingFactor); // -1 dB
|
||||||
m_modSample.imag(sin(m_modPhasor) * m_settings.m_rfScalingFactor);
|
m_modSample.imag(sin(m_modPhasor) * m_settings.m_rfScalingFactor);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user