NFM: review frequency deviation and NFM demod volume control

pull/687/head
f4exb 2020-11-05 23:21:04 +01:00
rodzic fecbd54a35
commit f1cf57bacd
9 zmienionych plików z 44 dodań i 31 usunięć

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 22 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 24 KiB

Plik binarny nie jest wyświetlany.

Wyświetl plik

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

Wyświetl plik

@ -336,16 +336,19 @@
</size>
</property>
<property name="toolTip">
<string>Sound volume</string>
<string>Sound volume (%)</string>
</property>
<property name="maximum">
<number>40</number>
<number>200</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>10</number>
<number>100</number>
</property>
</widget>
</item>
@ -364,10 +367,10 @@
</size>
</property>
<property name="toolTip">
<string>Sound volume</string>
<string>Sound volume (%)</string>
</property>
<property name="text">
<string>1.0</string>
<string>100</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

Wyświetl plik

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

Wyświetl plik

@ -24,7 +24,16 @@ Average total power in dB relative to a +/- 1.0 amplitude signal received in the
<h3>4: RF bandwidth</h3>
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: &plusmn; 1.25 kHz
- **6.25** kHz: &plusmn; 1.25 kHz
- **8.33** kHz: &plusmn; 1.67 kHz
- **11** kHz: &plusmn; 2.5 kHz (11F3)
- **16** kHz: &plusmn; 5 kHz (16F3)
- **20** kHz: &plusmn; 7 kHz
- **25** kHz: &plusmn; 9.5 kHz
- **40** kHz: &plusmn; 14 kHz
&#9758; 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
<h3>6: Volume</h3>
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.
<h3>7: Delta/Level squelch</h3>

Wyświetl plik

@ -299,7 +299,7 @@
<string>Modulation percentage</string>
</property>
<property name="maximum">
<number>250</number>
<number>300</number>
</property>
<property name="pageStep">
<number>1</number>
@ -827,29 +827,29 @@
<header>gui/rollupwidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>LevelMeterVU</class>
<extends>QWidget</extends>
<header>gui/levelmeter.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>CWKeyerGUI</class>
<extends>QWidget</extends>
<header>gui/cwkeyergui.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../../../sdrgui/resources/res.qrc"/>

Wyświetl plik

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

Wyświetl plik

@ -30,7 +30,7 @@ This is the bandwidth in khz of the modulating signal filtered before modulation
<h3>7: Frequency deviation</h3>
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.
<h3>8: Volume</h3>