Look for average decodes even when we get a single-sequence decode at nfqso.

This commit is contained in:
Joe Taylor 2021-03-16 11:39:59 -04:00
parent ca6354ae5b
commit 06f7ca7c75
2 changed files with 7 additions and 12 deletions

View File

@ -186,8 +186,9 @@ contains
enddo ! ipass
if(iand(ndepth,16).eq.0 .or. navg(iseq).lt.2) go to 100
! There was no single-transmission decode. Try for an average 'q3n' decode.
call timer('list_avg',0)
50 call timer('list_avg',0)
! Call top-level routine in q65 module: establish sync and try for a q3
! decode, this time using the cumulative 's1a' symbol spectra.
iavg=1
@ -257,13 +258,6 @@ contains
tdecode,mycall(1:6),c6,c4,trim(decoded)
close(22)
endif
! else
! Report snr1, even if no decode.
! nsnr=db(snr1) - 35.0
! if(nsnr.lt.-35) nsnr=-35
! idec=-1
! call this%callback(nutc,snr1,nsnr,xdt,f0,decoded, &
! idec,0,ntrperiod)
endif
navg0=1000*navg(0) + navg(1)
if(single_decode .or. lagain) go to 900
@ -342,7 +336,8 @@ contains
close(22)
endif
endif
enddo
enddo ! icand
if(iavg.eq.0 .and.navg(iseq).ge.2) go to 50
900 return
end subroutine decode

View File

@ -119,7 +119,7 @@ subroutine q65_dec0(iavg,nutc,iwave,ntrperiod,nfqso,ntol,ndepth,lclearave, &
lclearave=.false.
endif
ccf1=0.
ccf2_avg=0.
if(iavg.eq.0) ccf2_avg=0.
dtstep=nsps/(NSTEP*12000.0) !Step size in seconds
lag1=-1.0/dtstep
lag2=1.0/dtstep + 0.9999
@ -471,7 +471,7 @@ subroutine q65_ccf_22(s1,iz,jz,nfqso,ipk,jpk,f0,xdt,ccf2)
maxcand=20
do j=1,20
i=indx(jzz-j+1)+i1-1
if(ccf2(i).lt.3.4) exit !Candidate limit
if(ccf2(i).lt.3.3) exit !Candidate limit
f=i*df
if(f.ge.(nfqso-ftol) .and. f.le.(nfqso+ftol)) cycle
i3=max(1,i-67*mode_q65)
@ -581,7 +581,7 @@ subroutine q65_write_red(iz,xdt,ccf2_avg,ccf2)
rewind 17
write(17,1000) xdt,minval(ccf2_avg),maxval(ccf2_avg)
do i=max(1,nint(nfa/df)),nint(nfb/df)
do i=max(1,nint(nfa/df)),min(iz,int(nfb/df))
freq=i*df
y1=ccf2_avg(i)
if(y1.gt.10.0) y1=10.0 + 2.0*log10(y1/10.0)