kopia lustrzana https://github.com/f4exb/sdrangel
NFM: review frequency deviation and NFM demod volume control
rodzic
fecbd54a35
commit
f1cf57bacd
Plik binarny nie jest wyświetlany.
Przed Szerokość: | Wysokość: | Rozmiar: 22 KiB Po Szerokość: | Wysokość: | Rozmiar: 24 KiB |
Plik binarny nie jest wyświetlany.
|
@ -126,8 +126,8 @@ void NFMDemodGUI::on_afBW_valueChanged(int value)
|
||||||
|
|
||||||
void NFMDemodGUI::on_volume_valueChanged(int value)
|
void NFMDemodGUI::on_volume_valueChanged(int value)
|
||||||
{
|
{
|
||||||
ui->volumeText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1));
|
ui->volumeText->setText(QString("%1").arg(value));
|
||||||
m_settings.m_volume = value / 10.0;
|
m_settings.m_volume = value / 100.0;
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,8 +368,8 @@ void NFMDemodGUI::displaySettings()
|
||||||
ui->afBWText->setText(QString("%1 k").arg(m_settings.m_afBandwidth / 1000.0));
|
ui->afBWText->setText(QString("%1 k").arg(m_settings.m_afBandwidth / 1000.0));
|
||||||
ui->afBW->setValue(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->volumeText->setText(QString("%1").arg(m_settings.m_volume*100.0, 0, 'f', 0));
|
||||||
ui->volume->setValue(m_settings.m_volume * 10.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->squelchGateText->setText(QString("%1").arg(m_settings.m_squelchGate * 10.0f, 0, 'f', 0));
|
||||||
ui->squelchGate->setValue(m_settings.m_squelchGate);
|
ui->squelchGate->setValue(m_settings.m_squelchGate);
|
||||||
|
|
|
@ -336,16 +336,19 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Sound volume</string>
|
<string>Sound volume (%)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>40</number>
|
<number>200</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="pageStep">
|
<property name="pageStep">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
<property name="value">
|
||||||
<number>10</number>
|
<number>100</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -364,10 +367,10 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Sound volume</string>
|
<string>Sound volume (%)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>1.0</string>
|
<string>100</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
|
|
@ -23,13 +23,15 @@
|
||||||
|
|
||||||
#include "nfmdemodsettings.h"
|
#include "nfmdemodsettings.h"
|
||||||
|
|
||||||
|
// fixed |Carson (3k) |Carson (6k)
|
||||||
|
// | 11F3 16F3 |
|
||||||
const int NFMDemodSettings::m_rfBW[] = {
|
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
|
const int NFMDemodSettings::m_fmDev[] = {
|
||||||
2000, 2500, 3330, 4000, 5000, 6000, 8000, 10000, 16000
|
2500, 2500, 3330, 5000, 10000, 14000, 19000, 28000
|
||||||
};
|
};
|
||||||
const int NFMDemodSettings::m_nbRfBW = 9;
|
const int NFMDemodSettings::m_nbRfBW = 8;
|
||||||
|
|
||||||
NFMDemodSettings::NFMDemodSettings() :
|
NFMDemodSettings::NFMDemodSettings() :
|
||||||
m_channelMarker(0)
|
m_channelMarker(0)
|
||||||
|
|
|
@ -24,7 +24,16 @@ Average total power in dB relative to a +/- 1.0 amplitude signal received in the
|
||||||
|
|
||||||
<h3>4: RF bandwidth</h3>
|
<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: ± 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.
|
☞ 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>
|
<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>
|
<h3>7: Delta/Level squelch</h3>
|
||||||
|
|
||||||
|
|
|
@ -299,7 +299,7 @@
|
||||||
<string>Modulation percentage</string>
|
<string>Modulation percentage</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>250</number>
|
<number>300</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="pageStep">
|
<property name="pageStep">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
|
@ -827,29 +827,29 @@
|
||||||
<header>gui/rollupwidget.h</header>
|
<header>gui/rollupwidget.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</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>
|
<customwidget>
|
||||||
<class>LevelMeterVU</class>
|
<class>LevelMeterVU</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>gui/levelmeter.h</header>
|
<header>gui/levelmeter.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>ButtonSwitch</class>
|
|
||||||
<extends>QToolButton</extends>
|
|
||||||
<header>gui/buttonswitch.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>CWKeyerGUI</class>
|
<class>CWKeyerGUI</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>gui/cwkeyergui.h</header>
|
<header>gui/cwkeyergui.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>ValueDialZ</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header>gui/valuedialz.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../sdrgui/resources/res.qrc"/>
|
<include location="../../../sdrgui/resources/res.qrc"/>
|
||||||
|
|
|
@ -134,11 +134,10 @@ void NFMModSource::modulateSample()
|
||||||
calculateLevel(t);
|
calculateLevel(t);
|
||||||
m_audioBufferFill++;
|
m_audioBufferFill++;
|
||||||
|
|
||||||
// 0.625 = 1/1.25 (heuristic)
|
|
||||||
if (m_settings.m_ctcssOn) {
|
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 {
|
} 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]
|
// limit phasor range to ]-pi,pi]
|
||||||
|
|
|
@ -30,7 +30,7 @@ This is the bandwidth in khz of the modulating signal filtered before modulation
|
||||||
|
|
||||||
<h3>7: Frequency deviation</h3>
|
<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>
|
<h3>8: Volume</h3>
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue