mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -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
d69d3b4ca0
commit
7137098869
@ -44,7 +44,7 @@
|
||||
<string>Select tab to change configuration parameters.</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="general_tab">
|
||||
<attribute name="title">
|
||||
|
@ -36,6 +36,8 @@ EchoGraph::EchoGraph(QSettings * settings, QWidget *parent) :
|
||||
ui->echoPlot->m_blue=m_settings->value("BlueCurve",false).toBool();
|
||||
ui->cbBlue->setChecked(ui->echoPlot->m_blue);
|
||||
m_settings->endGroup();
|
||||
|
||||
ui->cbBlue->setVisible(false); //Not using "blue" (for now, at least)
|
||||
}
|
||||
|
||||
EchoGraph::~EchoGraph()
|
||||
@ -66,6 +68,7 @@ void EchoGraph::saveSettings()
|
||||
void EchoGraph::plotSpec()
|
||||
{
|
||||
ui->echoPlot->draw();
|
||||
ui->nsum_label->setText("N: " + QString::number(echocom_.nsum));
|
||||
}
|
||||
|
||||
void EchoGraph::on_smoothSpinBox_valueChanged(int n)
|
||||
|
16
echograph.ui
16
echograph.ui
@ -212,6 +212,22 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</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>
|
||||
<widget class="QCheckBox" name="cbBlue">
|
||||
<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
|
||||
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
|
||||
integer nsum !Number of integrations
|
||||
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 x(NFFT)
|
||||
integer ipkv(1)
|
||||
@ -23,7 +23,7 @@ subroutine avecho(id2,ndop,nfrit,nqual,f1,rms0,sigdb,snr,dfreq,width)
|
||||
x(i)=id2(i)
|
||||
sq=sq + x(i)*x(i)
|
||||
enddo
|
||||
rms0=sqrt(sq/TXLENGTH)
|
||||
xlevel=10.0*log10(sq/TXLENGTH)
|
||||
|
||||
if(nclearave.ne.0) nsum=0
|
||||
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
|
||||
blue(i)=sa(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)
|
||||
sq=sq + (red(i)-1.0)**2
|
||||
endif
|
||||
@ -73,7 +73,7 @@ subroutine avecho(id2,ndop,nfrit,nqual,f1,rms0,sigdb,snr,dfreq,width)
|
||||
redmax=maxval(red)
|
||||
ipkv=maxloc(red)
|
||||
fac=10.0/max(redmax,10.0)
|
||||
dfreq=(ipk-1000)*df
|
||||
dfreq=(ipk-2048)*df
|
||||
snr=(redmax-ave)/rms
|
||||
|
||||
sigdb=-99.0
|
||||
|
@ -829,15 +829,19 @@ void MainWindow::dataSink(qint64 frames)
|
||||
int nfrit=0;
|
||||
int nqual=0;
|
||||
float f1=1500.0;
|
||||
float rms=0.0;
|
||||
float xlevel=0.0;
|
||||
float sigdb=0.0;
|
||||
float dfreq=0.0;
|
||||
float width=0.0;
|
||||
echocom_.nclearave=m_nclearave;
|
||||
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);
|
||||
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();
|
||||
m_nclearave=0;
|
||||
return;
|
||||
@ -3243,6 +3247,9 @@ void MainWindow::on_actionEcho_triggered()
|
||||
mode_label->setText(m_mode);
|
||||
VHF_controls_visible(false);
|
||||
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)
|
||||
|
@ -560,7 +560,7 @@ extern "C" {
|
||||
void savec2_(char* fname, int* m_TRseconds, double* m_dialFreq, int len1);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user