diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index 89c5cfd49..1d83d4868 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -62,12 +62,12 @@ contains complex, allocatable :: c00(:) !Analytic signal, 6000 Sa/s complex, allocatable :: c0(:) !Analytic signal, 6000 Sa/s - id1=0 - id2=0 + idec=-1 mode65=2**nsubmode npts=ntrperiod*12000 nfft1=ntrperiod*12000 nfft2=ntrperiod*6000 + if(lclearave) nsave=0 allocate(dd(npts)) allocate (c00(0:nfft1-1)) allocate (c0(0:nfft1-1)) diff --git a/lib/qra/q65/q65_avg.f90 b/lib/qra/q65/q65_avg.f90 index 3b46f10cb..d3ac60246 100644 --- a/lib/qra/q65/q65_avg.f90 +++ b/lib/qra/q65/q65_avg.f90 @@ -123,12 +123,10 @@ subroutine q65_avg(nutc,ntrperiod,LL,nfqso,ntol,lclearave,xdt,f0,snr1,s3) b90=1.72**ibw b90ts=b90/baud call q65_dec1(s3avg,nsubmode,b90ts,codewords,ncw,esnodb,irc,dat4,avemsg) -! irc=-99 !### TEMPORARY ### - if(irc.ge.0 .and. plog.ge.PLOG_MIN) then + if(irc.ge.0) then snr2=esnodb - 0.5*db(2500.0/baud) + 3.0 !Empirical adjustment snr2=snr2 - db(float(navg)) !Is this right? idec=100+navg -! print*,'C dec1 ',ibw,irc,idec,avemsg go to 900 endif enddo diff --git a/lib/qra/q65/q65_sync.f90 b/lib/qra/q65/q65_sync.f90 index e2b35098c..7721d2cd5 100644 --- a/lib/qra/q65/q65_sync.f90 +++ b/lib/qra/q65/q65_sync.f90 @@ -180,9 +180,7 @@ subroutine q65_sync(nutc,iwave,ntrperiod,mode_q65,codewords,ncw,nsps, & b90=1.72**ibw b90ts=b90/baud call q65_dec1(s3,nsubmode,b90ts,codewords,ncw,esnodb,irc,dat4,decoded) -! irc=-99 !### TEMPORARY ### if(irc.ge.0) then -! print*,'A dec1 ',ibw,irc,esnodb,baud,trim(decoded) snr2=esnodb - db(2500.0/baud) + 3.0 !Empirical adjustment idec=1 ic=ia2/4; @@ -290,6 +288,8 @@ subroutine q65_dec1(s3,nsubmode,b90ts,codewords,ncw,esnodb,irc,dat4,decoded) write(c77,1000) dat4(1:12),dat4(13)/2 1000 format(12b6.6,b5.5) call unpack77(c77,0,decoded,unpk77_success) !Unpack to get msgsent + else + irc=-1 endif return