Reduce ntol.

Add "red3" (but not yet using it).


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3275 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-05-16 19:01:16 +00:00
parent 6339dc4b7e
commit 3cdf283c55
6 changed files with 51 additions and 46 deletions

Binary file not shown.

View File

@ -11,6 +11,7 @@ subroutine decoder(ss,c0,nstandalone)
character*20 datetime
real*4 ccfred(NSMAX)
real*4 red2(NSMAX)
real*4 red3(NSMAX)
logical ccfok(NSMAX)
logical done(NSMAX)
integer*1 i1SoftSymbols(207)
@ -67,14 +68,18 @@ subroutine decoder(ss,c0,nstandalone)
lag1=-(2.5/tstep + 0.9999)
lag2=5.0/tstep + 0.9999
call timer('sync9 ',0)
call sync9(ss,nzhsym,lag1,lag2,ia,ib,ccfred,red2,ipk)
call sync9(ss,nzhsym,lag1,lag2,ia,ib,ccfred,red2,red3,ipk)
call timer('sync9 ',1)
red2lim=1.6
schklim=2.2
nsps8=nsps/8
df8=1500.0/nsps8
dblim=db(864.0/nsps8) - 26.2
do nqd=1,0,-1
limit=1000
ccflim=4.0
red2lim=1.6
schklim=2.2
if(ndepth.eq.2) then
limit=10000
ccflim=3.5
@ -83,28 +88,25 @@ subroutine decoder(ss,c0,nstandalone)
limit=100000
ccflim=2.5
endif
ccfok=.false.
if(nqd.eq.1) then
limit=100000
ccflim=2.0
ccfok(ia:ib)=.true.
! ccflim=2.0
! red2lim=-20.
! schklim=1.0
nfa1=nfqso-ntol
nfb1=nfqso+ntol
else
nfa1=nfa
nfb1=nfb
endif
ia=max(1,nint((nfa1-1000)/df3))
ib=min(NSMAX,nint((nfb1-1000)/df3))
ccfok=.false.
if(nqd.eq.1) then
ccfok(ipk)=.true.
do i=ia,ib
ccfok(i)=ccfred(i).gt.ccflim .and. red2(i).gt.red2lim
enddo
ia=max(1,nint((nfa1-1000)/df3))
ib=min(NSMAX,nint((nfb1-1000)/df3))
ia1=ia
ib1=ib
else
nfa1=nfa
nfb1=nfb
ia=max(1,nint((nfa1-1000)/df3))
ib=min(NSMAX,nint((nfb1-1000)/df3))
do i=ia,ib
ccfok(i)=ccfred(i).gt.ccflim .and. red2(i).gt.red2lim
enddo
@ -113,9 +115,6 @@ subroutine decoder(ss,c0,nstandalone)
nRxLog=0
fgood=0.
nsps8=nsps/8
df8=1500.0/nsps8
dblim=db(864.0/nsps8) - 26.2
do i=ia,ib
f=(i-1)*df3
@ -145,9 +144,9 @@ subroutine decoder(ss,c0,nstandalone)
nsnr=nint(snrdb)
ndrift=nint(drift/df3)
! write(38,3002) nutc,nqd,nsnr,i,freq,ccfred(i),red2(i), &
! schk,nlim,msg
!3002 format(i4.4,i2,i5,i6,f8.1,3f6.1,i9,2x,a22)
write(38,3002) nutc,nqd,nsnr,i,freq,ccfred(i),red2(i), &
red3(i),schk,nlim,msg
3002 format(i4.4,i2,i4,i5,f7.1,f5.1,f6.1,2f5.1,i8,1x,a22)
if(msg.ne.' ') then
if(nqd.eq.0) ndecodes0=ndecodes0+1
@ -168,7 +167,8 @@ subroutine decoder(ss,c0,nstandalone)
call flush(6)
endif
else
! write(38,3002) nutc,nqd,-99,i,freq,ccfred(i),red2(i),schk,0
write(38,3002) nutc,nqd,-99,i,freq,ccfred(i),red2(i),red3(i), &
schk,0
endif
endif
enddo
@ -186,11 +186,11 @@ subroutine decoder(ss,c0,nstandalone)
if(nstandalone.eq.0) call timer('decoder ',101)
call system_clock(iclock,iclock_rate,iclock_max)
! write(39,3001) nutc,nfreqs1,nfreqs0,ndecodes1,ndecodes0+ndecodes1, &
! float(iclock-iclock0)/iclock_rate
!3001 format(5i8,f10.3)
! call flush(38)
! call flush(39)
write(39,3001) nutc,nfreqs1,nfreqs0,ndecodes1,ndecodes0+ndecodes1, &
float(iclock-iclock0)/iclock_rate
3001 format(5i8,f10.3)
call flush(38)
call flush(39)
return
end subroutine decoder

View File

@ -12,7 +12,7 @@ subroutine fillcom(nutc0,ndepth0)
npts8=74736
nfa=1000
nfb=2000
ntol=10
ntol=3
kin=1024
nzhsym=173
nsave=0

View File

@ -11,8 +11,6 @@ subroutine softsym(c0,npts8,nsps8,newdat,fpk,syncpk,snrdb,xdt,freq,drift, &
integer*1 i1SoftSymbolsScrambled(207)
integer*1 i1SoftSymbols(207)
include 'jt9sync.f90'
data freq0/-999.0/,drift0/-999.0/
save freq0,drift0
nspsd=16
ndown=nsps8/nspsd
@ -28,14 +26,6 @@ subroutine softsym(c0,npts8,nsps8,newdat,fpk,syncpk,snrdb,xdt,freq,drift, &
freq=fpk - a(1)
drift=-2.0*a(2)
if(abs(freq-freq0).lt.0.1 .and. abs(drift-drift0).lt.0.1) then
schk=0.
go to 999
endif
freq0=freq
drift0=drift
newdat=0
call twkfreq(c3,c5,nz3,fsample,a) !Correct for deltaF, fDot, fDDot
! Compute soft symbols (in scrambled order)

View File

@ -1,4 +1,4 @@
subroutine sync9(ss,nzhsym,lag1,lag2,ia,ib,ccfred,red2,ipkbest)
subroutine sync9(ss,nzhsym,lag1,lag2,ia,ib,ccfred,red2,red3,ipkbest)
parameter (NSMAX=22000) !Max length of saved spectra
real ss(184,NSMAX)
@ -9,6 +9,7 @@ subroutine sync9(ss,nzhsym,lag1,lag2,ia,ib,ccfred,red2,ipkbest)
real smo(-5:25)
real sq(NSMAX)
real red2(NSMAX)
real red3(NSMAX)
include 'jt9sync.f90'
ipk=0
@ -26,19 +27,34 @@ subroutine sync9(ss,nzhsym,lag1,lag2,ia,ib,ccfred,red2,ipkbest)
if(ss1(j).gt.3.0) ss1(j)=3.0
enddo
call pctile(ss1,nzhsym,45,sbase)
ss1=ss1-sbase
sq0=dot_product(ss1(1:nzhsym),ss1(1:nzhsym))
rms=sqrt(sq0/(nzhsym-1))
smax=0.
smax2=0.
do lag=lag1,lag2 !DT = 2.5 to 5.0 s
sum1=0.
sq2=sq0
nsum=nzhsym
do j=1,16 !Sum over 16 sync symbols
k=ii2(j) + lag
if(k.ge.1 .and. k.le.nzhsym) sum1=sum1 + ss1(k)
if(k.ge.1 .and. k.le.nzhsym) then
sum1=sum1 + ss1(k)
sq2=sq2 - ss1(k)*ss1(k)
nsum=nsum-1
endif
enddo
if(sum1.gt.smax) then
smax=sum1
ipk=i
endif
rms=sqrt(sq2/(nsum-1))
if(sum1/rms.gt.smax2) smax2=sum1/rms
enddo
ccfred(i)=smax !Best at this freq, over all lags
red3(i)=0.1*smax2 - 1.0
if(smax.gt.sbest) then
sbest=smax
ipkbest=ipk
@ -48,14 +64,13 @@ subroutine sync9(ss,nzhsym,lag1,lag2,ia,ib,ccfred,red2,ipkbest)
call pctile(ccfred(ia),ib-ia+1,50,xmed)
if(xmed.le.0.0) xmed=1.0
ccfred=2.0*ccfred/xmed
! ccfred=4.0*(ccfred/xmed - 1.0)
savg=0.
do j=1,nzhsym
savg(ia:ib)=savg(ia:ib) + ss(j,ia:ib)
enddo
df=1500.0/2048.0 ! 0.732422
df9=12000.0/6912.0 ! 1.736111
! df=1500.0/2048.0 ! 0.732422
! df9=12000.0/6912.0 ! 1.736111
savg(ia:ib)=savg(ia:ib)/nzhsym
smo(0:20)=1.0/21.0
smo(-5:-1)=-(1.0/21.0)*(21.0/10.0)

View File

@ -1227,7 +1227,7 @@ void MainWindow::decode() //decode()
jt9com_.nfa=g_pWideGraph->getFmin();
jt9com_.nfb=g_pWideGraph->getFmax();
jt9com_.ntol=10;
jt9com_.ntol=3;
if(jt9com_.nutc < m_nutc0) m_RxLog |= 1; //Date and Time to all65.txt
m_nutc0=jt9com_.nutc;
jt9com_.nrxlog=m_RxLog;