DATV: added LDPC max bit flip control and future soft LDPC control. Updated documentation

pull/788/head
f4exb 2021-02-27 12:51:32 +01:00
rodzic d39b5d793e
commit 75b08c0dee
15 zmienionych plików z 149 dodań i 36 usunięć

Plik binarny nie jest wyświetlany.

Przed

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

Po

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

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Przed

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

Po

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

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Przed

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

Po

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

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Przed

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

Po

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

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -281,6 +281,8 @@ void DATVDemodGUI::displaySettings()
ui->chkHardMetric->setChecked(m_settings.m_hardMetric);
ui->chkFastlock->setChecked(m_settings.m_fastLock);
ui->chkViterbi->setChecked(m_settings.m_viterbi);
ui->softLDPC->setChecked(m_settings.m_softLDPC);
ui->maxBitflips->setValue(m_settings.m_maxBitflips);
if (m_settings.m_standard == DATVDemodSettings::dvb_version::DVB_S)
{
@ -288,10 +290,15 @@ void DATVDemodGUI::displaySettings()
ui->chkHardMetric->setEnabled(true);
ui->chkFastlock->setEnabled(true);
ui->chkViterbi->setEnabled(true);
ui->softLDPC->setEnabled(false);
ui->maxBitflips->setEnabled(false);
ui->chkAllowDrift->setStyleSheet("QCheckBox { color: white }");
ui->chkHardMetric->setStyleSheet("QCheckBox { color: white }");
ui->chkFastlock->setStyleSheet("QCheckBox { color: white }");
ui->chkViterbi->setStyleSheet("QCheckBox { color: white }");
ui->softLDPC->setStyleSheet("QCheckBox { color: gray }");
ui->maxBitflips->setStyleSheet("QSpinBox { color: gray }");
ui->maxBitflipsLabel->setStyleSheet("QLabel { color: gray }");
}
else
{
@ -299,10 +306,15 @@ void DATVDemodGUI::displaySettings()
ui->chkHardMetric->setEnabled(false);
ui->chkFastlock->setEnabled(false);
ui->chkViterbi->setEnabled(false);
ui->softLDPC->setEnabled(true);
ui->maxBitflips->setEnabled(true);
ui->chkAllowDrift->setStyleSheet("QCheckBox { color: gray }");
ui->chkHardMetric->setStyleSheet("QCheckBox { color: gray }");
ui->chkFastlock->setStyleSheet("QCheckBox { color: gray }");
ui->chkViterbi->setStyleSheet("QCheckBox { color: gray }");
ui->softLDPC->setStyleSheet("QCheckBox { color: white }");
ui->maxBitflips->setStyleSheet("QSpinBox { color: white }");
ui->maxBitflipsLabel->setStyleSheet("QLabel { color: white }");
}
if (m_settings.m_standard == DATVDemodSettings::dvb_version::DVB_S) {
@ -508,10 +520,15 @@ void DATVDemodGUI::on_cmbStandard_currentIndexChanged(int index)
ui->chkHardMetric->setEnabled(true);
ui->chkFastlock->setEnabled(true);
ui->chkViterbi->setEnabled(true);
ui->softLDPC->setEnabled(false);
ui->maxBitflips->setEnabled(false);
ui->chkAllowDrift->setStyleSheet("QCheckBox { color: white }");
ui->chkHardMetric->setStyleSheet("QCheckBox { color: white }");
ui->chkFastlock->setStyleSheet("QCheckBox { color: white }");
ui->chkViterbi->setStyleSheet("QCheckBox { color: white }");
ui->softLDPC->setStyleSheet("QCheckBox { color: gray }");
ui->maxBitflips->setStyleSheet("QSpinBox { color: gray }");
ui->maxBitflipsLabel->setStyleSheet("QLabel { color: gray }");
}
else
{
@ -519,10 +536,15 @@ void DATVDemodGUI::on_cmbStandard_currentIndexChanged(int index)
ui->chkHardMetric->setEnabled(false);
ui->chkFastlock->setEnabled(false);
ui->chkViterbi->setEnabled(false);
ui->softLDPC->setEnabled(true);
ui->maxBitflips->setEnabled(true);
ui->chkAllowDrift->setStyleSheet("QCheckBox { color: gray }");
ui->chkHardMetric->setStyleSheet("QCheckBox { color: gray }");
ui->chkFastlock->setStyleSheet("QCheckBox { color: gray }");
ui->chkViterbi->setStyleSheet("QCheckBox { color: gray }");
ui->softLDPC->setStyleSheet("QCheckBox { color: white }");
ui->maxBitflips->setStyleSheet("QSpinBox { color: white }");
ui->maxBitflipsLabel->setStyleSheet("QLabel { color: white }");
}
if (m_settings.m_standard == DATVDemodSettings::dvb_version::DVB_S) {
@ -560,6 +582,18 @@ void DATVDemodGUI::on_cmbFEC_currentIndexChanged(const QString &arg1)
applySettings();
}
void DATVDemodGUI::on_softLDPC_clicked()
{
m_settings.m_softLDPC = ui->softLDPC->isChecked();
applySettings();
}
void DATVDemodGUI::on_maxBitflips_valueChanged(int value)
{
m_settings.m_maxBitflips = value;
applySettings();
}
void DATVDemodGUI::on_chkViterbi_clicked()
{
m_settings.m_viterbi = ui->chkViterbi->isChecked();

Wyświetl plik

@ -67,6 +67,8 @@ private slots:
void on_cmbStandard_currentIndexChanged(int index);
void on_cmbModulation_currentIndexChanged(const QString &arg1);
void on_cmbFEC_currentIndexChanged(const QString &arg1);
void on_softLDPC_clicked();
void on_maxBitflips_valueChanged(int value);
void on_chkViterbi_clicked();
void on_chkHardMetric_clicked();
void on_resetDefaults_clicked();

Wyświetl plik

@ -216,7 +216,7 @@
<x>0</x>
<y>0</y>
<width>496</width>
<height>250</height>
<height>281</height>
</rect>
</property>
<property name="minimumSize">
@ -225,12 +225,6 @@
<height>250</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>496</width>
<height>250</height>
</size>
</property>
<property name="title">
<string>DATV Settings</string>
</property>
@ -286,7 +280,7 @@
<x>230</x>
<y>20</y>
<width>261</width>
<height>221</height>
<height>251</height>
</rect>
</property>
<property name="frameShape">
@ -451,7 +445,7 @@
<rect>
<x>10</x>
<y>120</y>
<width>111</width>
<width>121</width>
<height>20</height>
</rect>
</property>
@ -524,7 +518,7 @@
<property name="geometry">
<rect>
<x>70</x>
<y>200</y>
<y>230</y>
<width>181</width>
<height>20</height>
</rect>
@ -540,7 +534,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>180</y>
<y>210</y>
<width>111</width>
<height>16</height>
</rect>
@ -594,7 +588,7 @@
<property name="geometry">
<rect>
<x>130</x>
<y>180</y>
<y>210</y>
<width>121</width>
<height>16</height>
</rect>
@ -610,7 +604,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>200</y>
<y>230</y>
<width>61</width>
<height>15</height>
</rect>
@ -623,7 +617,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>150</y>
<y>180</y>
<width>91</width>
<height>22</height>
</rect>
@ -651,7 +645,7 @@
<property name="geometry">
<rect>
<x>140</x>
<y>150</y>
<y>180</y>
<width>41</width>
<height>23</height>
</rect>
@ -673,7 +667,7 @@
<property name="geometry">
<rect>
<x>106</x>
<y>150</y>
<y>180</y>
<width>28</width>
<height>23</height>
</rect>
@ -686,7 +680,7 @@
<property name="geometry">
<rect>
<x>180</x>
<y>150</y>
<y>180</y>
<width>28</width>
<height>23</height>
</rect>
@ -699,7 +693,7 @@
<property name="geometry">
<rect>
<x>210</x>
<y>150</y>
<y>180</y>
<width>41</width>
<height>23</height>
</rect>
@ -730,13 +724,67 @@
<string>...</string>
</property>
</widget>
<widget class="QCheckBox" name="softLDPC">
<property name="geometry">
<rect>
<x>10</x>
<y>150</y>
<width>111</width>
<height>20</height>
</rect>
</property>
<property name="toolTip">
<string>Soft LDPC decoder (LDPC tool)</string>
</property>
<property name="text">
<string>SOFT LDPC</string>
</property>
</widget>
<widget class="QLabel" name="maxBitflipsLabel">
<property name="geometry">
<rect>
<x>140</x>
<y>150</y>
<width>61</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>MAX BFL</string>
</property>
</widget>
<widget class="QSpinBox" name="maxBitflips">
<property name="geometry">
<rect>
<x>200</x>
<y>150</y>
<width>51</width>
<height>20</height>
</rect>
</property>
<property name="toolTip">
<string>LDPC maximum bitflips (hard decoder)</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>500</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</widget>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>310</y>
<x>10</x>
<y>350</y>
<width>481</width>
<height>33</height>
</rect>
@ -828,16 +876,13 @@
<widget class="QWidget" name="horizontalLayoutWidget_2">
<property name="geometry">
<rect>
<x>0</x>
<y>250</y>
<x>10</x>
<y>290</y>
<width>481</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="merLayout">
<property name="leftMargin">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="merLabel">
<property name="text">
@ -891,16 +936,13 @@
<widget class="QWidget" name="horizontalLayoutWidget_3">
<property name="geometry">
<rect>
<x>0</x>
<y>280</y>
<x>10</x>
<y>320</y>
<width>481</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="cnrLayout">
<property name="leftMargin">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="cnrLabel">
<property name="text">

Wyświetl plik

@ -42,6 +42,8 @@ void DATVDemodSettings::resetToDefaults()
m_standard = DVB_S;
m_modulation = BPSK;
m_fec = FEC12;
m_softLDPC = false;
m_maxBitflips = 0;
m_symbolRate = 250000;
m_notchFilters = 0;
m_allowDrift = false;
@ -103,6 +105,8 @@ QByteArray DATVDemodSettings::serialize() const
s.writeU32(29, m_reverseAPIPort);
s.writeU32(30, m_reverseAPIDeviceIndex);
s.writeU32(31, m_reverseAPIChannelIndex);
s.writeBool(32, m_softLDPC);
s.writeS32(33, m_maxBitflips);
return s.final();
}
@ -185,6 +189,9 @@ bool DATVDemodSettings::deserialize(const QByteArray& data)
d.readU32(31, &utmp, 0);
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
d.readBool(32, &m_softLDPC, false);
d.readS32(33, &m_maxBitflips, 0);
validateSystemConfiguration();
return true;
@ -209,6 +216,8 @@ void DATVDemodSettings::debug(const QString& msg) const
<< " m_rollOff: " << m_rollOff
<< " m_viterbi: " << m_viterbi
<< " m_fec: " << m_fec
<< " m_softLDPC: " << m_softLDPC
<< " m_maxBitflips: " << m_maxBitflips
<< " m_modulation: " << m_modulation
<< " m_standard: " << m_standard
<< " m_notchFilters: " << m_notchFilters
@ -229,6 +238,8 @@ bool DATVDemodSettings::isDifferent(const DATVDemodSettings& other)
|| (m_rollOff != other.m_rollOff)
|| (m_viterbi != other.m_viterbi)
|| (m_fec != other.m_fec)
|| (m_softLDPC != other.m_softLDPC)
|| (m_maxBitflips != other.m_maxBitflips)
|| (m_modulation != other.m_modulation)
|| (m_standard != other.m_standard)
|| (m_notchFilters != other.m_notchFilters)

Wyświetl plik

@ -80,6 +80,8 @@ struct DATVDemodSettings
dvb_version m_standard;
DATVModulation m_modulation;
DATVCodeRate m_fec;
bool m_softLDPC;
int m_maxBitflips;
bool m_audioMute;
QString m_audioDeviceName;
int m_symbolRate;

Wyświetl plik

@ -1137,7 +1137,7 @@ void DATVDemodSink::InitDATVS2Framework()
);
leansdr::s2_fecdec<bool, leansdr::hard_sb> *fecdec = (leansdr::s2_fecdec<bool, leansdr::hard_sb> * ) r_fecdec;
fecdec->bitflips=0;
fecdec->bitflips=m_settings.m_maxBitflips;
/*
fecdec->bitflips = cfg.ldpc_bf; //int TODO
@ -1217,12 +1217,12 @@ void DATVDemodSink::feed(const SampleVector::const_iterator& begin, const Sample
if(m_settings.m_standard==DATVDemodSettings::DVB_S2)
{
printf("SWITCHING TO DVBS-2\r\n");
qDebug("DATVDemodSink::feed: init DVBS-2");
InitDATVS2Framework();
}
else
{
printf("SWITCHING TO DVBS\r\n");
qDebug("DATVDemodSink::feed: init DVBS");
InitDATVFramework();
}
}

Wyświetl plik

@ -40,15 +40,23 @@ Power of signal received in the channel (dB)
![DATV Demodulator plugin DATV GUI](../../../doc/img/DATVDemod_pluginDATV.png)
<h4>B.3: Output transport stream to UDP</h4>
<h4>B.3: MER estimation</h4>
This gauge gives the MER estimation. The averaged value appears on the right.
<h4>B.3: CNR estimation</h4>
This gauge gives the CNR estimation. The averaged value appears on the right.
<h4>B.5: Output transport stream to UDP</h4>
Activate output of transport stream to UDP with 7 TS blocks per UDP frame
<h4>B.4: UDP address</h4>
<h4>B.6: UDP address</h4>
This is the address of the TS UDP
<h4>B.5: UDP port</h4>
<h4>B.7: UDP port</h4>
This is the port of the TS UDP
@ -155,6 +163,20 @@ The mode and rate selection can be done manually but if a discrepancy in the num
The controls specific to DVB-S are disabled and greyed out. These are: Fast Lock, Allow Drift, Hard Metric and Viterbi.
<h5>B.2b.6: DVB-S2 specific - Soft LDPC decoder</h5>
Not implemented yet
<h5>B.2b.7: DVB-S2 specific - LDPC maximum number of bit flips allowed</h5>
May vary between 0 and 500. On strong signals (17 dB SNR or more) you may set it to 0 thus saving processing on occasional bit flips that will not cause significant degradation. When SNR decreases you may set it to a medium value of about 200 allowing bit flips corrections to take place and decoding of signals down to about 10dB MER. A higher value towards the maximum (500) will not make a significant difference and is allowed mostly for experimentation.
If you have enough processing power it is fine to always leave it at 200.
Comparatively:
- with max = 0 you need ~15 dB MER which corresponds to ~16 dB CNR
- with max = 200 you need ~10 dB MER which corresponds to ~13 dB CNR
<h3>C: DATV video stream</h3>
![DATV Demodulator plugin video GUI](../../../doc/img/DATVDemod_pluginVideo.png)