mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-05 11:09:13 -04:00
DATV demod: implemented CNR display
This commit is contained in:
parent
0dc554b30b
commit
076eeb7704
@ -67,6 +67,7 @@ public:
|
||||
|
||||
void SetTVScreen(TVScreen *objScreen) { m_basebandSink->setTVScreen(objScreen); }
|
||||
void setMERLabel(QLabel *merLabel) { m_basebandSink->setMERLabel(merLabel); }
|
||||
void setCNRLabel(QLabel *cnrLabel) { m_basebandSink->setCNRLabel(cnrLabel); }
|
||||
DATVideostream *SetVideoRender(DATVideoRender *objScreen) { return m_basebandSink->SetVideoRender(objScreen); }
|
||||
bool audioActive() { return m_basebandSink->audioActive(); }
|
||||
bool audioDecodeOK() { return m_basebandSink->audioDecodeOK(); }
|
||||
|
@ -87,6 +87,7 @@ public:
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
void setTVScreen(TVScreen *tvScreen) { m_sink.setTVScreen(tvScreen); }
|
||||
void setMERLabel(QLabel *merLabel) { m_sink.setMERLabel(merLabel); }
|
||||
void setCNRLabel(QLabel *cnrLabel) { m_sink.setCNRLabel(cnrLabel); }
|
||||
void setMessageQueueToGUI(MessageQueue *messageQueue) { m_sink.setMessageQueueToGUI(messageQueue); }
|
||||
void setBasebandSampleRate(int sampleRate); //!< To be used when supporting thread is stopped
|
||||
DATVideostream *SetVideoRender(DATVideoRender *objScreen) { return m_sink.SetVideoRender(objScreen); }
|
||||
|
@ -196,6 +196,7 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
|
||||
|
||||
m_objDATVDemod->SetTVScreen(ui->screenTV);
|
||||
m_objDATVDemod->setMERLabel(ui->merText);
|
||||
m_objDATVDemod->setCNRLabel(ui->cnrText);
|
||||
|
||||
connect(m_objDATVDemod->SetVideoRender(ui->screenTV_2), &DATVideostream::onDataPackets, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(ui->screenTV_2, &DATVideoRender::onMetaDataChanged, this, &DATVDemodGUI::on_StreamMetaDataChanged);
|
||||
|
@ -38,6 +38,7 @@ DATVDemodSink::DATVDemodSink() :
|
||||
m_udpStream(leansdr::tspacket::SIZE),
|
||||
m_objRenderThread(nullptr),
|
||||
m_merLabel(nullptr),
|
||||
m_cnrLabel(nullptr),
|
||||
m_audioFifo(48000),
|
||||
m_blnRenderingVideo(false),
|
||||
m_blnStartStopVideo(false),
|
||||
@ -87,11 +88,14 @@ bool DATVDemodSink::setTVScreen(TVScreen *objScreen)
|
||||
return true;
|
||||
}
|
||||
|
||||
void DATVDemodSink::setMERLabel(QLabel *merLabel)
|
||||
{
|
||||
void DATVDemodSink::setMERLabel(QLabel *merLabel) {
|
||||
m_merLabel = merLabel;
|
||||
}
|
||||
|
||||
void DATVDemodSink::setCNRLabel(QLabel *cnrLabel) {
|
||||
m_cnrLabel = cnrLabel;
|
||||
}
|
||||
|
||||
DATVideostream *DATVDemodSink::SetVideoRender(DATVideoRender *objScreen)
|
||||
{
|
||||
m_objRegisteredVideoRender = objScreen;
|
||||
@ -350,6 +354,9 @@ void DATVDemodSink::CleanUpDATVFramework(bool blnRelease)
|
||||
if (r_merGauge != nullptr) {
|
||||
delete r_merGauge;
|
||||
}
|
||||
if (r_cnrGauge != nullptr) {
|
||||
delete r_cnrGauge;
|
||||
}
|
||||
|
||||
// INPUT
|
||||
//if(p_rawiq!=nullptr) delete p_rawiq;
|
||||
@ -504,6 +511,7 @@ void DATVDemodSink::CleanUpDATVFramework(bool blnRelease)
|
||||
//CONSTELLATION
|
||||
r_scope_symbols = nullptr;
|
||||
r_merGauge = nullptr;
|
||||
r_cnrGauge = nullptr;
|
||||
|
||||
//DVB-S2
|
||||
p_slots_dvbs2 = nullptr;
|
||||
@ -650,7 +658,7 @@ void DATVDemodSink::InitDATVFramework()
|
||||
if (m_objCfg.cnr == true)
|
||||
{
|
||||
r_cnr = new leansdr::cnr_fft<leansdr::f32>(m_objScheduler, *p_preprocessed, *p_cnr, m_objCfg.Fm/m_objCfg.Fs);
|
||||
r_cnr->decimation = decimation(m_objCfg.Fs, 1); // 1 Hz
|
||||
r_cnr->decimation = decimation(m_objCfg.Fs, 5); // 5 Hz
|
||||
}
|
||||
|
||||
// FILTERING
|
||||
@ -779,6 +787,10 @@ void DATVDemodSink::InitDATVFramework()
|
||||
r_merGauge = new leansdr::datvgaugelabel(m_objScheduler, *p_mer, m_merLabel);
|
||||
}
|
||||
|
||||
if (m_cnrLabel) {
|
||||
r_cnrGauge = new leansdr::datvgaugelabel(m_objScheduler, *p_cnr, m_cnrLabel);
|
||||
}
|
||||
|
||||
// DECONVOLUTION AND SYNCHRONIZATION
|
||||
|
||||
p_bytes = new leansdr::pipebuf<leansdr::u8>(m_objScheduler, "bytes", BUF_BYTES);
|
||||
@ -972,15 +984,15 @@ void DATVDemodSink::InitDATVS2Framework()
|
||||
//******** -> if ( m_objCfg.Fderot>0 )
|
||||
|
||||
// CNR ESTIMATION
|
||||
/**
|
||||
|
||||
p_cnr = new leansdr::pipebuf<leansdr::f32>(m_objScheduler, "cnr", BUF_SLOW);
|
||||
|
||||
if (m_objCfg.cnr == true)
|
||||
{
|
||||
r_cnr = new leansdr::cnr_fft<leansdr::f32>(m_objScheduler, *p_preprocessed, *p_cnr, m_objCfg.Fm/m_objCfg.Fs);
|
||||
r_cnr->decimation = decimation(m_objCfg.Fs, 1); // 1 Hz
|
||||
r_cnr->decimation = decimation(m_objCfg.Fs, 5); // 5 Hz
|
||||
}
|
||||
**/
|
||||
|
||||
// FILTERING
|
||||
|
||||
//******** -> if ( m_objCfg.resample )
|
||||
@ -1087,6 +1099,10 @@ void DATVDemodSink::InitDATVS2Framework()
|
||||
r_merGauge = new leansdr::datvgaugelabel(m_objScheduler, *p_mer, m_merLabel);
|
||||
}
|
||||
|
||||
if (m_cnrLabel) {
|
||||
r_cnrGauge = new leansdr::datvgaugelabel(m_objScheduler, *p_cnr, m_cnrLabel);
|
||||
}
|
||||
|
||||
// Bit-flipping mode.
|
||||
// Deinterleave into hard bits.
|
||||
|
||||
|
@ -59,6 +59,7 @@ public:
|
||||
|
||||
bool setTVScreen(TVScreen *objScreen);
|
||||
void setMERLabel(QLabel *merLabel);
|
||||
void setCNRLabel(QLabel *cnrLabel);
|
||||
DATVideostream * SetVideoRender(DATVideoRender *objScreen);
|
||||
bool audioActive();
|
||||
bool audioDecodeOK();
|
||||
@ -114,7 +115,7 @@ private:
|
||||
Fs(2.4e6),
|
||||
Fderot(0),
|
||||
anf(0),
|
||||
cnr(false),
|
||||
cnr(true),
|
||||
decim(0),
|
||||
Fm(2e6),
|
||||
constellation(leansdr::cstln_lut<leansdr::eucl_ss, 256>::QPSK),
|
||||
@ -275,6 +276,7 @@ private:
|
||||
leansdr::datvconstellation<leansdr::f32> *r_scope_symbols;
|
||||
leansdr::datvdvbs2constellation<leansdr::f32> *r_scope_symbols_dvbs2;
|
||||
leansdr::datvgaugelabel *r_merGauge;
|
||||
leansdr::datvgaugelabel *r_cnrGauge;
|
||||
|
||||
//*************** DATV PARAMETERS ***************
|
||||
TVScreen *m_objRegisteredTVScreen;
|
||||
@ -283,6 +285,7 @@ private:
|
||||
DATVUDPStream m_udpStream;
|
||||
DATVideoRenderThread *m_objRenderThread;
|
||||
QLabel *m_merLabel;
|
||||
QLabel *m_cnrLabel;
|
||||
|
||||
// Audio
|
||||
AudioFifo m_audioFifo;
|
||||
|
Loading…
Reference in New Issue
Block a user