From f4412ea7e2aa7a9d5931cdaae1e74cfe4456d77e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 6 Dec 2022 12:27:48 -0500 Subject: [PATCH] Only call decode() once, at ihsym=302. --- q65w/astro.cpp | 2 +- q65w/commons.h | 2 +- q65w/libm65/decode0.f90 | 10 ++++------ q65w/libm65/map65a.f90 | 2 +- q65w/mainwindow.cpp | 24 ++++++++---------------- q65w/mainwindow.h | 1 - 6 files changed, 15 insertions(+), 26 deletions(-) diff --git a/q65w/astro.cpp b/q65w/astro.cpp index a6b0460a8..38c45857b 100644 --- a/q65w/astro.cpp +++ b/q65w/astro.cpp @@ -70,7 +70,7 @@ void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid, &azmoondx, &elmoondx, &ntsky, &ndop, &ndop00,&ramoon, &decmoon, &dgrd, &poloffset, &xnr, 6, 6); - datcom_.nfast=ndop00; //Send self Doppler to decoder, via datcom + datcom_.ndop00=ndop00; //Send self Doppler to decoder, via datcom sprintf(cc, "Az: %6.1f\n" "El: %6.1f\n" diff --git a/q65w/commons.h b/q65w/commons.h index f7ea43d9e..e8fff92bd 100644 --- a/q65w/commons.h +++ b/q65w/commons.h @@ -31,7 +31,7 @@ extern struct { //This is "common/datcom/..." in Fortran int nfsample; //Input sample rate int nxpol; //1 if using xpol antennas, 0 otherwise int nmode; //nmode = 10*m_modeQ65 + m_modeJT65 - int nfast; //No longer used + int ndop00; //EME Self Doppler int nsave; //Number of s3(64,63) spectra saved int max_drift; //Maximum Q65 drift: units symbol_rate/TxT int nhsym; //Number of available JT65 half-symbols diff --git a/q65w/libm65/decode0.f90 b/q65w/libm65/decode0.f90 index 438079f1d..e3e8c251d 100644 --- a/q65w/libm65/decode0.f90 +++ b/q65w/libm65/decode0.f90 @@ -19,6 +19,7 @@ subroutine decode0(dd,ss,savg,nstandalone) save call sec0(0,tquick) + ncand=0 call timer('decode0 ',0) if(newdat.ne.0) then nz=96000*nhsym/5.3833 @@ -56,15 +57,12 @@ subroutine decode0(dd,ss,savg,nstandalone) mousedf,mousefqso,nagain,ndecdone,nfshift,ndphi,max_drift, & nfcal,nkeep,mcall3b,nsum,nsave,nxant,mycall,mygrid, & neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, & - ndiskdat,nxpol,nmode,ndop00) + ndiskdat,nxpol,nmode,ndop00,ncand) call timer('map65a ',1) call timer('decode0 ',1) - call sec0(1,tdec) - if(nhsym.eq.nhsym1) write(*,1010) nsum,nsave,nstandalone,nhsym,tdec -1010 format('',3i4,i6,f6.2) - if(nhsym.eq.nhsym2) write(*,1012) nsum,nsave,nstandalone,nhsym,tdec,ndecodes -1012 format('',3i4,i6,f6.2,i5) + if(nhsym.eq.nhsym2) write(*,1012) ndecodes,ncand +1012 format('',2i4) flush(6) return diff --git a/q65w/libm65/map65a.f90 b/q65w/libm65/map65a.f90 index a6bf1bb80..249bbf6e4 100644 --- a/q65w/libm65/map65a.f90 +++ b/q65w/libm65/map65a.f90 @@ -2,7 +2,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & mousedf,mousefqso,nagain,ndecdone,nfshift,ndphi,max_drift, & nfcal,nkeep,mcall3b,nsum,nsave,nxant,mycall,mygrid, & neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, & - ndiskdat,nxpol,nmode,ndop00) + ndiskdat,nxpol,nmode,ndop00,ncand) ! Processes timf2 data from Linrad to find and decode JT65 and Q65 signals. diff --git a/q65w/mainwindow.cpp b/q65w/mainwindow.cpp index 1f0d4369d..8c1fd7453 100644 --- a/q65w/mainwindow.cpp +++ b/q65w/mainwindow.cpp @@ -90,7 +90,6 @@ MainWindow::MainWindow(QWidget *parent) : m_waterfallAvg = 1; m_network = true; m_restart=false; - m_widebandDecode=false; m_myCall="K1JT"; m_myGrid="FN20qi"; m_saveDir="/users/joe/map65/install/save"; @@ -495,7 +494,7 @@ void MainWindow::dataSink(int k) n=0; } - if(ihsym>=302) { //Decode at t=56 s (for Q65 and data from disk) + if(ihsym==302) { //Decode at t=56 s (for Q65 and data from disk) m_RxState=2; datcom_.newdat=1; datcom_.nagain=0; @@ -958,7 +957,7 @@ void MainWindow::decode() //decode() int nfreq=(int)datcom_.fcenter; int ndop00; astrosub00_(&nyear, &month, &nday, &uth, &nfreq, m_myGrid.toLatin1(),&ndop00,6); - datcom_.nfast=ndop00; //Send self Doppler to decoder, via datcom + datcom_.ndop00=ndop00; //Send self Doppler to decoder, via datcom } } datcom_.neme=0; @@ -987,7 +986,6 @@ void MainWindow::decode() //decode() if(!m_fs96000) datcom_.nfsample=95238; datcom_.nxpol=0; datcom_.nmode=10*m_modeQ65 + m_modeJT65; -// datcom_.nfast=1; //No longer used datcom_.nsave=m_nsave; datcom_.max_drift=ui->sbMaxDrift->value(); @@ -1053,22 +1051,17 @@ void MainWindow::m65_error (QProcess::ProcessError) } void MainWindow::readFromStdout() //readFromStdout -{ +{ while(proc_m65.canReadLine()) { QByteArray t=proc_m65.readLine(); - if((t.indexOf("") >= 0) or (t.indexOf("") >= 0)) { - if(m_widebandDecode) { - m_widebandDecode=false; - } + if(t.indexOf("") >= 0) { QFile lockFile(m_appDir + "/.lock"); lockFile.open(QIODevice::ReadWrite); - if(t.indexOf("") >= 0) { - int ndecodes=t.mid(40,5).toInt(); - lab5->setText(QString::number(ndecodes)); - m_map65RxLog=0; - m_startAnother=m_loopall; - } + QString t1=t.mid(16,8); + lab5->setText(t1); + m_map65RxLog=0; + m_startAnother=m_loopall; ui->DecodeButton->setStyleSheet(""); decodeBusy(false); return; @@ -1083,7 +1076,6 @@ void MainWindow::readFromStdout() //readFromStdout if(n>=30 or t.indexOf("Best-fit")>=0) ui->decodedTextBrowser->append(t.mid(1,n-m).trimmed()); n=ui->decodedTextBrowser->verticalScrollBar()->maximum(); ui->decodedTextBrowser->verticalScrollBar()->setValue(n); - m_widebandDecode=true; } } } diff --git a/q65w/mainwindow.h b/q65w/mainwindow.h index 3eea5d083..e860a586a 100644 --- a/q65w/mainwindow.h +++ b/q65w/mainwindow.h @@ -146,7 +146,6 @@ private: bool m_startAnother; bool m_saveAll; bool m_onlyEME; - bool m_widebandDecode; bool m_kb8rq; bool m_NB; bool m_fs96000;