diff --git a/doc/img/NFMdemod_plugin.png b/doc/img/NFMdemod_plugin.png index 56aeab458..5c3147e44 100644 Binary files a/doc/img/NFMdemod_plugin.png and b/doc/img/NFMdemod_plugin.png differ diff --git a/doc/img/NFMdemod_plugin.xcf b/doc/img/NFMdemod_plugin.xcf index 56ba60fd9..b7fa63b72 100644 Binary files a/doc/img/NFMdemod_plugin.xcf and b/doc/img/NFMdemod_plugin.xcf differ diff --git a/plugins/channelrx/demodnfm/nfmdemodgui.cpp b/plugins/channelrx/demodnfm/nfmdemodgui.cpp index a7e9dc72f..ec1cfa69c 100644 --- a/plugins/channelrx/demodnfm/nfmdemodgui.cpp +++ b/plugins/channelrx/demodnfm/nfmdemodgui.cpp @@ -126,8 +126,8 @@ void NFMDemodGUI::on_afBW_valueChanged(int value) void NFMDemodGUI::on_volume_valueChanged(int value) { - ui->volumeText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1)); - m_settings.m_volume = value / 10.0; + ui->volumeText->setText(QString("%1").arg(value)); + m_settings.m_volume = value / 100.0; applySettings(); } @@ -368,8 +368,8 @@ void NFMDemodGUI::displaySettings() ui->afBWText->setText(QString("%1 k").arg(m_settings.m_afBandwidth / 1000.0)); ui->afBW->setValue(m_settings.m_afBandwidth / 1000.0); - ui->volumeText->setText(QString("%1").arg(m_settings.m_volume, 0, 'f', 1)); - ui->volume->setValue(m_settings.m_volume * 10.0); + ui->volumeText->setText(QString("%1").arg(m_settings.m_volume*100.0, 0, 'f', 0)); + ui->volume->setValue(m_settings.m_volume * 100.0); ui->squelchGateText->setText(QString("%1").arg(m_settings.m_squelchGate * 10.0f, 0, 'f', 0)); ui->squelchGate->setValue(m_settings.m_squelchGate); diff --git a/plugins/channelrx/demodnfm/nfmdemodgui.ui b/plugins/channelrx/demodnfm/nfmdemodgui.ui index d7cb4820c..8d3eb29f8 100644 --- a/plugins/channelrx/demodnfm/nfmdemodgui.ui +++ b/plugins/channelrx/demodnfm/nfmdemodgui.ui @@ -336,16 +336,19 @@ - Sound volume + Sound volume (%) - 40 + 200 + + + 1 1 - 10 + 100 @@ -364,10 +367,10 @@ - Sound volume + Sound volume (%) - 1.0 + 100 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/plugins/channelrx/demodnfm/nfmdemodsettings.cpp b/plugins/channelrx/demodnfm/nfmdemodsettings.cpp index 55fb412c2..de5c3479a 100644 --- a/plugins/channelrx/demodnfm/nfmdemodsettings.cpp +++ b/plugins/channelrx/demodnfm/nfmdemodsettings.cpp @@ -23,13 +23,15 @@ #include "nfmdemodsettings.h" +// fixed |Carson (3k) |Carson (6k) +// | 11F3 16F3 | const int NFMDemodSettings::m_rfBW[] = { - 5000, 6250, 8330, 10000, 12500, 15000, 20000, 25000, 40000 + 5000, 6250, 8330, 11000, 16000, 20000, 25000, 40000 }; -const int NFMDemodSettings::m_fmDev[] = { // corresponding single side FM deviations at 0.4 * BW - 2000, 2500, 3330, 4000, 5000, 6000, 8000, 10000, 16000 +const int NFMDemodSettings::m_fmDev[] = { + 2500, 2500, 3330, 5000, 10000, 14000, 19000, 28000 }; -const int NFMDemodSettings::m_nbRfBW = 9; +const int NFMDemodSettings::m_nbRfBW = 8; NFMDemodSettings::NFMDemodSettings() : m_channelMarker(0) diff --git a/plugins/channelrx/demodnfm/readme.md b/plugins/channelrx/demodnfm/readme.md index 92f0b8021..f16fa47c8 100644 --- a/plugins/channelrx/demodnfm/readme.md +++ b/plugins/channelrx/demodnfm/readme.md @@ -24,7 +24,16 @@ Average total power in dB relative to a +/- 1.0 amplitude signal received in the

4: RF bandwidth

-This is the bandwidth in kHz of the channel signal before demodulation. It can be set in steps as 5, 6.25, 8.33, 10, 12.5, 15, 20, 25 and 40 kHz. The expected one side frequency deviation is 0.4 times the bandwidth. +This is the bandwidth in kHz of the channel signal before demodulation. It can take these values with the corresponding nominal frequency deviation: + + - **5** kHz: ± 1.25 kHz + - **6.25** kHz: ± 1.25 kHz + - **8.33** kHz: ± 1.67 kHz + - **11** kHz: ± 2.5 kHz (11F3) + - **16** kHz: ± 5 kHz (16F3) + - **20** kHz: ± 7 kHz + - **25** kHz: ± 9.5 kHz + - **40** kHz: ± 14 kHz ☞ The demodulation is done at the channel sample rate which is guaranteed not to be lower than the requested audio sample rate but can possibly be equal to it. This means that for correct operation in any case you must ensure that the sample rate of the audio device is not lower than the Nyquist rate required to process this channel bandwidth. @@ -36,7 +45,7 @@ This is the bandwidth of the audio signal in kHz (i.e. after demodulation). It c

6: Volume

-This is the volume of the audio signal from 0.0 (mute) to 4.0 (maximum). It can be varied continuously in 0.1 steps using the dial button. +This is the volume of the audio signal from 0% (mute) to 200% (maximum) of volume at nominal frequency deviation. It can be varied continuously 1% steps using the dial button.

7: Delta/Level squelch

diff --git a/plugins/channeltx/modnfm/nfmmodgui.ui b/plugins/channeltx/modnfm/nfmmodgui.ui index e154043a8..ea064368f 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.ui +++ b/plugins/channeltx/modnfm/nfmmodgui.ui @@ -299,7 +299,7 @@ Modulation percentage
- 250 + 300 1 @@ -827,29 +827,29 @@
gui/rollupwidget.h
1 + + ButtonSwitch + QToolButton +
gui/buttonswitch.h
+
+ + ValueDialZ + QWidget +
gui/valuedialz.h
+ 1 +
LevelMeterVU QWidget
gui/levelmeter.h
1
- - ButtonSwitch - QToolButton -
gui/buttonswitch.h
-
CWKeyerGUI QWidget
gui/cwkeyergui.h
1
- - ValueDialZ - QWidget -
gui/valuedialz.h
- 1 -
diff --git a/plugins/channeltx/modnfm/nfmmodsource.cpp b/plugins/channeltx/modnfm/nfmmodsource.cpp index bc0d5e0c1..6ed08b9dd 100644 --- a/plugins/channeltx/modnfm/nfmmodsource.cpp +++ b/plugins/channeltx/modnfm/nfmmodsource.cpp @@ -134,11 +134,10 @@ void NFMModSource::modulateSample() calculateLevel(t); m_audioBufferFill++; - // 0.625 = 1/1.25 (heuristic) if (m_settings.m_ctcssOn) { - m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * (0.85f * m_bandpass.filter(t) + 0.15f * 0.625f * m_ctcssNco.next()) * (M_PI / 0.625f); + m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * (0.85f * m_bandpass.filter(t) + 0.15f * 0.625f * m_ctcssNco.next()) * 1.33f; } else { - m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * m_bandpass.filter(t) * (M_PI / 0.625f); + m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * m_bandpass.filter(t) * 1.33f; } // limit phasor range to ]-pi,pi] diff --git a/plugins/channeltx/modnfm/readme.md b/plugins/channeltx/modnfm/readme.md index 22139d828..f03bacb39 100644 --- a/plugins/channeltx/modnfm/readme.md +++ b/plugins/channeltx/modnfm/readme.md @@ -30,7 +30,7 @@ This is the bandwidth in khz of the modulating signal filtered before modulation

7: Frequency deviation

-Adjusts the frequency deviation in 0.1 kHz steps from 0 to 25 kHz +Adjusts the frequency deviation in 0.1 kHz steps from 0 to 30 kHz. This is the full deviation.

8: Volume