diff --git a/Configuration.ui b/Configuration.ui
index 535fce4bf..21923311c 100644
--- a/Configuration.ui
+++ b/Configuration.ui
@@ -44,7 +44,7 @@
Select tab to change configuration parameters.
- 2
+ 0
diff --git a/echograph.cpp b/echograph.cpp
index 1a33ecc5a..96c013540 100644
--- a/echograph.cpp
+++ b/echograph.cpp
@@ -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)
diff --git a/echograph.ui b/echograph.ui
index 1a820f2b4..95d5e6cca 100644
--- a/echograph.ui
+++ b/echograph.ui
@@ -212,6 +212,22 @@
+ -
+
+
+
+ 30
+ 0
+
+
+
+ N: 0
+
+
+ Qt::AlignCenter
+
+
+
-
diff --git a/lib/avecho.f90 b/lib/avecho.f90
index e1bd397bb..88916ba20 100644
--- a/lib/avecho.f90
+++ b/lib/avecho.f90
@@ -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
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 31cad75eb..a5434767f 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -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)
diff --git a/mainwindow.h b/mainwindow.h
index f822c5a0d..a22742820 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -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);
}