Only call decode() once, at ihsym=302.

This commit is contained in:
Joe Taylor 2022-12-06 12:27:48 -05:00
parent 5344fa559c
commit f4412ea7e2
6 changed files with 15 additions and 26 deletions

View File

@ -70,7 +70,7 @@ void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid,
&azmoondx, &elmoondx, &ntsky, &ndop, &ndop00,&ramoon, &decmoon, &azmoondx, &elmoondx, &ntsky, &ndop, &ndop00,&ramoon, &decmoon,
&dgrd, &poloffset, &xnr, 6, 6); &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, sprintf(cc,
"Az: %6.1f\n" "Az: %6.1f\n"
"El: %6.1f\n" "El: %6.1f\n"

View File

@ -31,7 +31,7 @@ extern struct { //This is "common/datcom/..." in Fortran
int nfsample; //Input sample rate int nfsample; //Input sample rate
int nxpol; //1 if using xpol antennas, 0 otherwise int nxpol; //1 if using xpol antennas, 0 otherwise
int nmode; //nmode = 10*m_modeQ65 + m_modeJT65 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 nsave; //Number of s3(64,63) spectra saved
int max_drift; //Maximum Q65 drift: units symbol_rate/TxT int max_drift; //Maximum Q65 drift: units symbol_rate/TxT
int nhsym; //Number of available JT65 half-symbols int nhsym; //Number of available JT65 half-symbols

View File

@ -19,6 +19,7 @@ subroutine decode0(dd,ss,savg,nstandalone)
save save
call sec0(0,tquick) call sec0(0,tquick)
ncand=0
call timer('decode0 ',0) call timer('decode0 ',0)
if(newdat.ne.0) then if(newdat.ne.0) then
nz=96000*nhsym/5.3833 nz=96000*nhsym/5.3833
@ -56,15 +57,12 @@ subroutine decode0(dd,ss,savg,nstandalone)
mousedf,mousefqso,nagain,ndecdone,nfshift,ndphi,max_drift, & mousedf,mousefqso,nagain,ndecdone,nfshift,ndphi,max_drift, &
nfcal,nkeep,mcall3b,nsum,nsave,nxant,mycall,mygrid, & nfcal,nkeep,mcall3b,nsum,nsave,nxant,mycall,mygrid, &
neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, & neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, &
ndiskdat,nxpol,nmode,ndop00) ndiskdat,nxpol,nmode,ndop00,ncand)
call timer('map65a ',1) call timer('map65a ',1)
call timer('decode0 ',1) call timer('decode0 ',1)
call sec0(1,tdec) if(nhsym.eq.nhsym2) write(*,1012) ndecodes,ncand
if(nhsym.eq.nhsym1) write(*,1010) nsum,nsave,nstandalone,nhsym,tdec 1012 format('<DecodeFinished>',2i4)
1010 format('<EarlyFinished>',3i4,i6,f6.2)
if(nhsym.eq.nhsym2) write(*,1012) nsum,nsave,nstandalone,nhsym,tdec,ndecodes
1012 format('<DecodeFinished>',3i4,i6,f6.2,i5)
flush(6) flush(6)
return return

View File

@ -2,7 +2,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
mousedf,mousefqso,nagain,ndecdone,nfshift,ndphi,max_drift, & mousedf,mousefqso,nagain,ndecdone,nfshift,ndphi,max_drift, &
nfcal,nkeep,mcall3b,nsum,nsave,nxant,mycall,mygrid, & nfcal,nkeep,mcall3b,nsum,nsave,nxant,mycall,mygrid, &
neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, & 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. ! Processes timf2 data from Linrad to find and decode JT65 and Q65 signals.

View File

@ -90,7 +90,6 @@ MainWindow::MainWindow(QWidget *parent) :
m_waterfallAvg = 1; m_waterfallAvg = 1;
m_network = true; m_network = true;
m_restart=false; m_restart=false;
m_widebandDecode=false;
m_myCall="K1JT"; m_myCall="K1JT";
m_myGrid="FN20qi"; m_myGrid="FN20qi";
m_saveDir="/users/joe/map65/install/save"; m_saveDir="/users/joe/map65/install/save";
@ -495,7 +494,7 @@ void MainWindow::dataSink(int k)
n=0; 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; m_RxState=2;
datcom_.newdat=1; datcom_.newdat=1;
datcom_.nagain=0; datcom_.nagain=0;
@ -958,7 +957,7 @@ void MainWindow::decode() //decode()
int nfreq=(int)datcom_.fcenter; int nfreq=(int)datcom_.fcenter;
int ndop00; int ndop00;
astrosub00_(&nyear, &month, &nday, &uth, &nfreq, m_myGrid.toLatin1(),&ndop00,6); 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; datcom_.neme=0;
@ -987,7 +986,6 @@ void MainWindow::decode() //decode()
if(!m_fs96000) datcom_.nfsample=95238; if(!m_fs96000) datcom_.nfsample=95238;
datcom_.nxpol=0; datcom_.nxpol=0;
datcom_.nmode=10*m_modeQ65 + m_modeJT65; datcom_.nmode=10*m_modeQ65 + m_modeJT65;
// datcom_.nfast=1; //No longer used
datcom_.nsave=m_nsave; datcom_.nsave=m_nsave;
datcom_.max_drift=ui->sbMaxDrift->value(); datcom_.max_drift=ui->sbMaxDrift->value();
@ -1053,22 +1051,17 @@ void MainWindow::m65_error (QProcess::ProcessError)
} }
void MainWindow::readFromStdout() //readFromStdout void MainWindow::readFromStdout() //readFromStdout
{ {
while(proc_m65.canReadLine()) while(proc_m65.canReadLine())
{ {
QByteArray t=proc_m65.readLine(); QByteArray t=proc_m65.readLine();
if((t.indexOf("<EarlyFinished>") >= 0) or (t.indexOf("<DecodeFinished>") >= 0)) { if(t.indexOf("<DecodeFinished>") >= 0) {
if(m_widebandDecode) {
m_widebandDecode=false;
}
QFile lockFile(m_appDir + "/.lock"); QFile lockFile(m_appDir + "/.lock");
lockFile.open(QIODevice::ReadWrite); lockFile.open(QIODevice::ReadWrite);
if(t.indexOf("<DecodeFinished>") >= 0) { QString t1=t.mid(16,8);
int ndecodes=t.mid(40,5).toInt(); lab5->setText(t1);
lab5->setText(QString::number(ndecodes)); m_map65RxLog=0;
m_map65RxLog=0; m_startAnother=m_loopall;
m_startAnother=m_loopall;
}
ui->DecodeButton->setStyleSheet(""); ui->DecodeButton->setStyleSheet("");
decodeBusy(false); decodeBusy(false);
return; 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()); if(n>=30 or t.indexOf("Best-fit")>=0) ui->decodedTextBrowser->append(t.mid(1,n-m).trimmed());
n=ui->decodedTextBrowser->verticalScrollBar()->maximum(); n=ui->decodedTextBrowser->verticalScrollBar()->maximum();
ui->decodedTextBrowser->verticalScrollBar()->setValue(n); ui->decodedTextBrowser->verticalScrollBar()->setValue(n);
m_widebandDecode=true;
} }
} }
} }

View File

@ -146,7 +146,6 @@ private:
bool m_startAnother; bool m_startAnother;
bool m_saveAll; bool m_saveAll;
bool m_onlyEME; bool m_onlyEME;
bool m_widebandDecode;
bool m_kb8rq; bool m_kb8rq;
bool m_NB; bool m_NB;
bool m_fs96000; bool m_fs96000;