B2 mode decodes now. (Still needs work, though.)

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2560 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-09-05 20:34:31 +00:00
parent 29599830eb
commit 5f4c119c93
4 changed files with 22 additions and 14 deletions

View File

@ -1,7 +1,7 @@
subroutine ccf2(ss,nz,nflip,ccfbest,lagpk)
parameter (LAGMAX=60)
! parameter (LAGMAX=200)
! parameter (LAGMAX=60)
parameter (LAGMAX=200)
real ss(nz)
real ccf(-LAGMAX:LAGMAX)
integer npr(126)

View File

@ -13,7 +13,7 @@ subroutine ccf65(ss,nhsym,nfast,ssmax,sync1,ipol1,jpz,dt1,flipk, &
complex cpr2(0:NH) !Complex FT of pr2
real tmp1(322)
real tmp2(322)
real ccf(-27:27,4)
real ccf(-11:54,4)
logical first
integer npr(126)
data first/.true./
@ -71,8 +71,10 @@ subroutine ccf65(ss,nhsym,nfast,ssmax,sync1,ipol1,jpz,dt1,flipk, &
call four2a(cs,NFFT,1,1,-1) !Complex-to-real inv-FFT
call four2a(cs2,NFFT,1,1,-1) !Complex-to-real inv-FFT
do lag=-27,27 !Check for best JT65 sync
ccf(lag,ip)=s(lag+28)
do lag=-11,54 !Check for best JT65 sync
j=lag
if(j.lt.1) j=j+NFFT
ccf(lag,ip)=s(j)
if(abs(ccf(lag,ip)).gt.ccfbest) then
ccfbest=abs(ccf(lag,ip))
lagpk=lag
@ -95,17 +97,18 @@ subroutine ccf65(ss,nhsym,nfast,ssmax,sync1,ipol1,jpz,dt1,flipk, &
! Find rms level on baseline of "ccfblue", for normalization.
sum=0.
do lag=-26,26
do lag=-11,54
if(abs(lag-lagpk).gt.1) sum=sum + ccf(lag,ipol1)
enddo
base=sum/50.0
sq=0.
do lag=-26,26
do lag=-11,54
if(abs(lag-lagpk).gt.1) sq=sq + (ccf(lag,ipol1)-base)**2
enddo
rms=sqrt(sq/49.0)
sync1=ccfbest/rms - 4.0
dt1=(2.5 + lagpk*(2048.0/11025.0))/nfast
! dt1=(2.5 + lagpk*(2048.0/11025.0))/nfast
dt1=lagpk*(2048.0/11025.0)/nfast - 2.5
! Find base level for normalizing snr2.
do i=1,nhsym

View File

@ -101,8 +101,10 @@
! submodes B and C).
nsym=126
nfft=512/(nfast*mode65)
! nfft=512/(nfast*mode65)
nfft=512/nfast
j=(dt00+dtbest+2.685)*1378.125 + joff
if(nfast.eq.2) j=j-1506
if(j.lt.0) j=0
call timer('sh_ffts ',0)
@ -111,7 +113,8 @@
! (Tried this, found no significant difference in decodes.)
do k=1,nsym
do n=1,mode65
! do n=1,mode65
do n=1,1
do i=1,nfft
j=j+1
c5a(i)=aa*cx(j) + bb*cy(j)
@ -119,7 +122,10 @@
call four2a(c5a,nfft,1,1,1)
if(n.eq.1) then
do i=1,66
s2(i,k)=real(c5a(i))**2 + aimag(c5a(i))**2
! s2(i,k)=real(c5a(i))**2 + aimag(c5a(i))**2
jj=i
if(nfast.eq.1) jj=2*i-1
s2(i,k)=real(c5a(jj))**2 + aimag(c5a(jj))**2
enddo
else
do i=1,66

View File

@ -56,7 +56,6 @@ 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
fa=1000.0*(fqso+0.001*mousedf) - ntol
fb=1000.0*(fqso+0.001*mousedf) + ntol + 4*53.8330078
@ -114,7 +113,8 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
! 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=savg(jpmax,i)
ssmax=smax
call ccf65(ss(1,1,i),nhsym,nfast,ssmax,sync1,ipol,jpz,dt, &
flipk,syncshort,snr2,ipol2,dt2)
call timer('ccf65 ',1)
@ -205,7 +205,6 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
ifreq=i
ikHz=nint(freq+0.5*(nfa+nfb)-foffset)-nfshift
idf=nint(1000.0*(freq+0.5*(nfa+nfb)-foffset-(ikHz+nfshift)))
! print*,ikhz,idf,dt,sync1,dt
call decode1a(dd,newdat,f00,nflip,mode65,nfast,nfsample, &
xpol,mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi, &
ndphi,iloop,nutc,ikHz,idf,ipol,ntol,sync2,a,dt, &