mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-27 14:48:46 -05:00
Results of Echo mode to text window. (Not yet calibrated!)
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5567 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
4ccdb42107
commit
7adf33b02c
@ -44,7 +44,7 @@
|
|||||||
<string>Select tab to change configuration parameters.</string>
|
<string>Select tab to change configuration parameters.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="general_tab">
|
<widget class="QWidget" name="general_tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -36,6 +36,8 @@ EchoGraph::EchoGraph(QSettings * settings, QWidget *parent) :
|
|||||||
ui->echoPlot->m_blue=m_settings->value("BlueCurve",false).toBool();
|
ui->echoPlot->m_blue=m_settings->value("BlueCurve",false).toBool();
|
||||||
ui->cbBlue->setChecked(ui->echoPlot->m_blue);
|
ui->cbBlue->setChecked(ui->echoPlot->m_blue);
|
||||||
m_settings->endGroup();
|
m_settings->endGroup();
|
||||||
|
|
||||||
|
ui->cbBlue->setVisible(false); //Not using "blue" (for now, at least)
|
||||||
}
|
}
|
||||||
|
|
||||||
EchoGraph::~EchoGraph()
|
EchoGraph::~EchoGraph()
|
||||||
@ -66,6 +68,7 @@ void EchoGraph::saveSettings()
|
|||||||
void EchoGraph::plotSpec()
|
void EchoGraph::plotSpec()
|
||||||
{
|
{
|
||||||
ui->echoPlot->draw();
|
ui->echoPlot->draw();
|
||||||
|
ui->nsum_label->setText("N: " + QString::number(echocom_.nsum));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EchoGraph::on_smoothSpinBox_valueChanged(int n)
|
void EchoGraph::on_smoothSpinBox_valueChanged(int n)
|
||||||
|
16
echograph.ui
16
echograph.ui
@ -212,6 +212,22 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="nsum_label">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>N: 0</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="cbBlue">
|
<widget class="QCheckBox" name="cbBlue">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine avecho(id2,ndop,nfrit,nqual,f1,rms0,sigdb,snr,dfreq,width)
|
subroutine avecho(id2,ndop,nfrit,nqual,f1,xlevel,sigdb,snr,dfreq,width)
|
||||||
|
|
||||||
integer TXLENGTH
|
integer TXLENGTH
|
||||||
parameter (TXLENGTH=27648) !27*1024
|
parameter (TXLENGTH=27648) !27*1024
|
||||||
@ -8,7 +8,7 @@ subroutine avecho(id2,ndop,nfrit,nqual,f1,rms0,sigdb,snr,dfreq,width)
|
|||||||
real sb(4096) !Avg spectrum with Dither and changing Doppler removed
|
real sb(4096) !Avg spectrum with Dither and changing Doppler removed
|
||||||
integer nsum !Number of integrations
|
integer nsum !Number of integrations
|
||||||
real dop0 !Doppler shift for initial integration (Hz)
|
real dop0 !Doppler shift for initial integration (Hz)
|
||||||
real doppler !Doppler shift for current integration (Hz)
|
real dop !Doppler shift for current integration (Hz)
|
||||||
real s(8192)
|
real s(8192)
|
||||||
real x(NFFT)
|
real x(NFFT)
|
||||||
integer ipkv(1)
|
integer ipkv(1)
|
||||||
@ -23,7 +23,7 @@ subroutine avecho(id2,ndop,nfrit,nqual,f1,rms0,sigdb,snr,dfreq,width)
|
|||||||
x(i)=id2(i)
|
x(i)=id2(i)
|
||||||
sq=sq + x(i)*x(i)
|
sq=sq + x(i)*x(i)
|
||||||
enddo
|
enddo
|
||||||
rms0=sqrt(sq/TXLENGTH)
|
xlevel=10.0*log10(sq/TXLENGTH)
|
||||||
|
|
||||||
if(nclearave.ne.0) nsum=0
|
if(nclearave.ne.0) nsum=0
|
||||||
if(nsum.eq.0) then
|
if(nsum.eq.0) then
|
||||||
@ -62,7 +62,7 @@ subroutine avecho(id2,ndop,nfrit,nqual,f1,rms0,sigdb,snr,dfreq,width)
|
|||||||
y=r0 + (r1-r0)*(i-100.0)/1800.0
|
y=r0 + (r1-r0)*(i-100.0)/1800.0
|
||||||
blue(i)=sa(i)/y
|
blue(i)=sa(i)/y
|
||||||
red(i)=sb(i)/y
|
red(i)=sb(i)/y
|
||||||
if(i.le.500 .or. i.ge.1501) then
|
if(i.le.500 .or. i.ge.3597) then
|
||||||
sum=sum+red(i)
|
sum=sum+red(i)
|
||||||
sq=sq + (red(i)-1.0)**2
|
sq=sq + (red(i)-1.0)**2
|
||||||
endif
|
endif
|
||||||
@ -73,7 +73,7 @@ subroutine avecho(id2,ndop,nfrit,nqual,f1,rms0,sigdb,snr,dfreq,width)
|
|||||||
redmax=maxval(red)
|
redmax=maxval(red)
|
||||||
ipkv=maxloc(red)
|
ipkv=maxloc(red)
|
||||||
fac=10.0/max(redmax,10.0)
|
fac=10.0/max(redmax,10.0)
|
||||||
dfreq=(ipk-1000)*df
|
dfreq=(ipk-2048)*df
|
||||||
snr=(redmax-ave)/rms
|
snr=(redmax-ave)/rms
|
||||||
|
|
||||||
sigdb=-99.0
|
sigdb=-99.0
|
||||||
|
@ -829,15 +829,19 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
int nfrit=0;
|
int nfrit=0;
|
||||||
int nqual=0;
|
int nqual=0;
|
||||||
float f1=1500.0;
|
float f1=1500.0;
|
||||||
float rms=0.0;
|
float xlevel=0.0;
|
||||||
float sigdb=0.0;
|
float sigdb=0.0;
|
||||||
float dfreq=0.0;
|
float dfreq=0.0;
|
||||||
float width=0.0;
|
float width=0.0;
|
||||||
echocom_.nclearave=m_nclearave;
|
echocom_.nclearave=m_nclearave;
|
||||||
int nDop=0;
|
int nDop=0;
|
||||||
avecho_(&jt9com_.d2[0],&nDop,&nfrit,&nqual,&f1,&rms,&sigdb,
|
avecho_(&jt9com_.d2[0],&nDop,&nfrit,&nqual,&f1,&xlevel,&sigdb,
|
||||||
&snr,&dfreq,&width);
|
&snr,&dfreq,&width);
|
||||||
qDebug() << "A" << m_nDopr << nDop;
|
QString t;
|
||||||
|
t.sprintf("%3d %7.1f %7.1f %7.1f %7.1f %3d",echocom_.nsum,xlevel,sigdb,
|
||||||
|
dfreq,width,nqual);
|
||||||
|
t=QDateTime::currentDateTimeUtc().toString("hh:mm:ss ") + t;
|
||||||
|
ui->decodedTextBrowser->appendText(t);
|
||||||
if(m_echoGraph->isVisible()) m_echoGraph->plotSpec();
|
if(m_echoGraph->isVisible()) m_echoGraph->plotSpec();
|
||||||
m_nclearave=0;
|
m_nclearave=0;
|
||||||
return;
|
return;
|
||||||
@ -3243,6 +3247,9 @@ void MainWindow::on_actionEcho_triggered()
|
|||||||
mode_label->setText(m_mode);
|
mode_label->setText(m_mode);
|
||||||
VHF_controls_visible(false);
|
VHF_controls_visible(false);
|
||||||
WSPR_config(true);
|
WSPR_config(true);
|
||||||
|
ui->decodedTextLabel->setText(" UTC N Level Sig DF Width Q");
|
||||||
|
auto_tx_label->setText("");
|
||||||
|
ui->tabWidget->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::switch_mode (Mode mode)
|
void MainWindow::switch_mode (Mode mode)
|
||||||
|
@ -560,7 +560,7 @@ extern "C" {
|
|||||||
void savec2_(char* fname, int* m_TRseconds, double* m_dialFreq, int len1);
|
void savec2_(char* fname, int* m_TRseconds, double* m_dialFreq, int len1);
|
||||||
|
|
||||||
void avecho_( short id2[], int* dop, int* nfrit, int* nqual, float* f1,
|
void avecho_( short id2[], int* dop, int* nfrit, int* nqual, float* f1,
|
||||||
float* rms, float* sigdb, float* snr, float* dfreq,
|
float* level, float* sigdb, float* snr, float* dfreq,
|
||||||
float* width);
|
float* width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user