Temporary(?) changes to allow calling a QRA64 decoder at nqd=2.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@7479 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-01-10 21:34:25 +00:00
parent 53e0b76e48
commit 077821e563
2 changed files with 66 additions and 58 deletions

View File

@ -27,6 +27,7 @@ subroutine decode1a(dd,newdat,f0,nflip,mode65,nfast,nfsample,xpol, &
call filbig(dd,NMAX,nfast,f0,newdat,nfsample,xpol,cx,cy,n5)
! NB: cx, cy have sample rate 96000*77125/5376000 = 1378.125 Hz
call timer('filbig ',1)
if(nqd.eq.2) goto 900
sqa=0.
sqb=0.
do i=1,n5
@ -152,5 +153,5 @@ subroutine decode1a(dd,newdat,f0,nflip,mode65,nfast,nfsample,xpol, &
nutc0=nutc
endif
return
900 return
end subroutine decode1a

View File

@ -57,9 +57,13 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
2 if(ndphi.eq.1) dphi=30*iloop/57.2957795
do nqd=1,0,-1
! do nqd=1,1,-1
if(nqd.eq.1) then !Quick decode, at fQSO
nqdz=1
if(bqra64) nqdz=2
do nqd=nqdz,0,-1
if(nqd.eq.2) then
fa=1000.0*fqso
fb=1000.0*fqso
else if(nqd.eq.1) then !Quick decode, at fQSO
fa=1000.0*(fqso+0.001*mousedf) - ntol
fb=1000.0*(fqso+0.001*mousedf) + ntol + 4*53.8330078
else !Wideband decode at all freqs
@ -70,6 +74,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
ib=nint(fb/df) + 16385
ia=max(51,ia)
ib=min(32768-51,ib)
write(66,*) 'A',nqd,ia,ib
km=0
nkm=1
@ -83,8 +88,6 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
jpz=1
if(xpol) jpz=4
! ia=17160
! ib=17160
do i=ia,ib !Search over freq range
freq=0.001*(i-16385)*df
! Find the local base level for each polarization; update every 10 bins.
@ -113,12 +116,11 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
endif
enddo
if(smax.gt.1.1) then
if(smax.gt.1.1 .or. ia.eq.ib) then
if(nqd.lt.2) then
! Look for JT65 sync patterns and shorthand square-wave patterns.
call timer('ccf65 ',0)
! ssmax=4.0*(rmsdd/22.5)**2
! ssmax=savg(jpmax,i)
ssmax=smax
call ccf65(ss(1,1,i),nhsym,nfast,ssmax,sync1,ipol,jpz,dt, &
flipk,syncshort,snr2,ipol2,dt2)
@ -148,8 +150,8 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
! Keep only the best candidate within ftol.
!### NB: sync2 was not defined here!
! sync2=syncshort !### try this ???
if(fshort-fshort0.le.ftol .and. syncshort.gt.syncshort0 &
.and. nkm.eq.2) km=km-1
if(fshort-fshort0.le.ftol .and. &
syncshort.gt.syncshort0 .and. nkm.eq.2) km=km-1
if(fshort-fshort0.gt.ftol .or. &
syncshort.gt.syncshort0) then
if(km.lt.MAXMSG) km=km+1
@ -180,6 +182,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
endif
enddo
endif
endif
! ########################### Search for Normal Messages ###########
! Is sync1 above threshold?
@ -187,8 +190,8 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
! Use lower thresh1 at fQSO
if(nqd.eq.1 .and. ntol.le.100) thresh1=0.
noffset=0
if(nqd.eq.1) noffset=nint(1000.0*(freq-fqso)-mousedf)
if(nqd.ge.1) noffset=nint(1000.0*(freq-fqso)-mousedf)
if(nqd.eq.2) sync1=thresh1+1.0
if(sync1.gt.thresh1 .and. abs(noffset).le.ntol) then
! Keep only the best candidate within ftol.
! (Am I deleting any good decodes by doing this?)
@ -206,6 +209,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
call flush(13)
go to 999
endif
write(66,*) 'B',nqd,f00
call timer('decode1a',0)
ifreq=i
ikHz=nint(freq+0.5*(nfa+nfb)-foffset)-nfshift
@ -215,6 +219,10 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
ndphi,iloop,nutc,ikHz,idf,ipol,ntol,bqra64,sync2, &
a,dt,pol,nkv,nhist,nsum,nsave,qual,decoded)
call timer('decode1a',1)
if(nqd.eq.2) then
write(66,*) 'C call QRA64 decoder here...'
cycle
endif
if(km.lt.MAXMSG) km=km+1
sig(km,1)=nfile
@ -242,7 +250,6 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
endif
endif
endif
!70 continue
enddo
if(nqd.eq.1) then