Don't use early decoding when data are read from disk.

This commit is contained in:
Joe Taylor 2021-08-04 14:38:34 -04:00
parent 990933024c
commit 2af2d8131d
3 changed files with 12 additions and 16 deletions

View File

@ -42,6 +42,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
! Clean start for Q65 at early decode ! Clean start for Q65 at early decode
if(nhsym.eq.nhsym1 .or. nagain.ne.0) ldecoded=.false. if(nhsym.eq.nhsym1 .or. nagain.ne.0) ldecoded=.false.
if(ndiskdat.eq.1) ldecoded=.false.
nkhz_center=nint(1000.0*(fcenter-int(fcenter))) nkhz_center=nint(1000.0*(fcenter-int(fcenter)))
mfa=nfa-nkhz_center+48 mfa=nfa-nkhz_center+48
@ -54,9 +55,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
xpol=(nxpol.ne.0) xpol=(nxpol.ne.0)
! No second decode for JT65? ! No second decode for JT65?
! if(nhsym.eq.nhsym2 .and. (nstandalone.eq.1 .or. ndiskdat.eq.0)) mode65=0 if(nhsym.eq.nhsym2 .and. nagain.eq.0 .and.ndiskdat.eq.0) mode65=0
if(nhsym.eq.nhsym2 .and. nagain.eq.0) mode65=0
! print*,'=a',nhsym,nagain,mode65
if(nagain.eq.0) then if(nagain.eq.0) then
call timer('get_cand',0) call timer('get_cand',0)
@ -110,6 +109,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
ib=nint(fb/df) + 16385 ib=nint(fb/df) + 16385
ia=max(51,ia) ia=max(51,ia)
ib=min(32768-51,ib) ib=min(32768-51,ib)
if(ndiskdat.eq.1 .and. mode65.eq.0) ib=ia
km=0 km=0
nkm=1 nkm=1
@ -122,7 +122,6 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
short=0. !Zero the whole short array short=0. !Zero the whole short array
jpz=1 jpz=1
if(xpol) jpz=4 if(xpol) jpz=4
if(mode65.eq.0) go to 50
! First steps for JT65 decoding ! First steps for JT65 decoding
do i=ia,ib !Search over freq range do i=ia,ib !Search over freq range
@ -156,7 +155,6 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
if(smax.gt.1.1 .or. ia.eq.ib) then if(smax.gt.1.1 .or. ia.eq.ib) then
! Look for JT65 sync patterns and shorthand square-wave patterns. ! Look for JT65 sync patterns and shorthand square-wave patterns.
call timer('ccf65 ',0) call timer('ccf65 ',0)
! ssmax=smax
ssmax=1.e30 ssmax=1.e30
call ccf65(ss(1,1,i),nhsym,ssmax,sync1,ipol,jpz,dt, & call ccf65(ss(1,1,i),nhsym,ssmax,sync1,ipol,jpz,dt, &
flipk,syncshort,snr2,ipol2,dt2) flipk,syncshort,snr2,ipol2,dt2)
@ -291,7 +289,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
endif endif
enddo !i=ia,ib enddo !i=ia,ib
50 if(nqd.eq.1) then if(nqd.eq.1) then
nwrite=0 nwrite=0
if(mode65.eq.0) km=0 if(mode65.eq.0) km=0
do k=1,km do k=1,km

View File

@ -520,7 +520,6 @@ void MainWindow::dataSink(int k)
static int nkhz; static int nkhz;
static int nfsample=96000; static int nfsample=96000;
static int nxpol=0; static int nxpol=0;
static int iRxState=0;
static float fgreen; static float fgreen;
static int ndiskdat; static int ndiskdat;
static int nb; static int nb;
@ -620,10 +619,10 @@ void MainWindow::dataSink(int k)
n=0; n=0;
} }
if(ihsym<280) iRxState=0; if(ihsym<280) m_RxState=0;
if(iRxState==0 and ihsym>=280) { //Early decode, t=52 s if(m_RxState==0 and ihsym>=280 and !m_diskData) { //Early decode, t=52 s
iRxState=1; m_RxState=1;
datcom_.newdat=1; datcom_.newdat=1;
datcom_.nagain=0; datcom_.nagain=0;
datcom_.nhsym=ihsym; datcom_.nhsym=ihsym;
@ -632,8 +631,8 @@ void MainWindow::dataSink(int k)
decode(); //Start the decoder decode(); //Start the decoder
} }
if(iRxState<=1 and ihsym>=302) { //Decode at t=56 s (for Q65 and data from disk) if(m_RxState<=1 and ihsym>=302) { //Decode at t=56 s (for Q65 and data from disk)
iRxState=2; m_RxState=2;
datcom_.newdat=1; datcom_.newdat=1;
datcom_.nagain=0; datcom_.nagain=0;
datcom_.nhsym=ihsym; datcom_.nhsym=ihsym;
@ -1126,10 +1125,7 @@ void MainWindow::diskDat() //diskDat()
for(int i=0; i<304; i++) { // Do the half-symbol FFTs for(int i=0; i<304; i++) { // Do the half-symbol FFTs
int k = i*hsym + 2048.5; int k = i*hsym + 2048.5;
dataSink(k); dataSink(k);
while(m_decoderBusy) { qApp->processEvents(); // Allow the waterfall to update
qApp->processEvents();
}
if(i%10 == 0) qApp->processEvents(); //Keep the GUI responsive
} }
} }

View File

@ -191,6 +191,8 @@ private:
qint32 m_TRperiod; qint32 m_TRperiod;
qint32 m_modeJT65; qint32 m_modeJT65;
qint32 m_modeQ65; qint32 m_modeQ65;
qint32 m_RxState;
double m_fAdd; double m_fAdd;
// double m_IQamp; // double m_IQamp;