From 926395561ea2f7afa2d48b0731d141f9a1ea5d8b Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 17 Jul 2013 19:13:36 +0000 Subject: [PATCH] Further optimizations of the decoders, and some code cleanup. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3492 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/decoder.f90 | 3 +-- lib/extract.F90 | 3 ++- lib/jt65a.f90 | 22 +++++----------------- lib/symspec2.f90 | 8 +++----- mainwindow.cpp | 2 +- 5 files changed, 12 insertions(+), 26 deletions(-) diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 4f7b57ab1..83e63a204 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -73,14 +73,13 @@ subroutine decoder(ss,id2) limit=10000 ccflim=3.5 endif - if(ndepth.ge.3) then + if(ndepth.ge.3 .or. nqd.eq.1) then limit=100000 ccflim=2.5 endif ccfok=.false. if(nqd.eq.1) then - limit=100000 nfa1=nfqso-ntol nfb1=nfqso+ntol ia=max(1,nint((nfa1-nf0)/df3)) diff --git a/lib/extract.F90 b/lib/extract.F90 index 7a4abf257..2b580f63e 100644 --- a/lib/extract.F90 +++ b/lib/extract.F90 @@ -64,7 +64,8 @@ subroutine extract(s3,nadd,ncount,nhist,decoded,ltext,nbmkv) if(nokv) go to 900 maxe=8 !Max KV errors in 12 most reliable symbols - xlambda=10.0 +! xlambda=12.0 + xlambda=7.99 call graycode65(mr2sym,63,-1) call interleave63(mr2sym,-1) call interleave63(mr2prob,-1) diff --git a/lib/jt65a.f90 b/lib/jt65a.f90 index b22e45c75..0c061eda7 100644 --- a/lib/jt65a.f90 +++ b/lib/jt65a.f90 @@ -39,26 +39,17 @@ subroutine jt65a(dd,npts,newdat,nutc,nfa,nfqso,ntol,nagain,ndecoded) thresh0=1.5 do i=ia,ib !Search over freq range - if(savg(i).lt.thresh0 .or. done(i)) cycle freq=i*df + if(savg(i).lt.thresh0 .or. done(i)) cycle call timer('ccf65 ',0) call ccf65(ss(1,i),nhsym,savg(i),sync1,dt,flipk,syncshort,snr2,dt2) call timer('ccf65 ',1) -! ########################### Search for Shorthand Messages ################# -! include 'shorthand1.f90' - -! ########################### Search for Normal Messages ########### + ftest=abs(freq-freq0) thresh1=1.0 -! Use lower thresh1 at fQSO if(nqd.eq.1 .and. ntol.le.100) thresh1=0. - -! Is sync1 above threshold? - if(sync1.lt.thresh1) cycle - -! Keep only the best candidate within ftol. - if(freq-freq0.lt.ftol) cycle + if(sync1.lt.thresh1 .or. ftest.lt.ftol) cycle nflip=nint(flipk) call timer('decod65a',0) @@ -66,11 +57,8 @@ subroutine jt65a(dd,npts,newdat,nutc,nfa,nfqso,ntol,nagain,ndecoded) nbmkv,nhist,decoded) call timer('decod65a',1) -! write(71,3001) ia,ib,i,nfqso,freq0,freq,freq+a(1),decoded -!3001 format(4i6,3f10.3,2x,a22) -! call flush(71) - - if(freq+a(1)-freq0.lt.ftol) cycle + ftest=abs(freq+a(1)-freq0) + if(ftest.lt.ftol) cycle if(decoded.ne.' ') then ndecoded=1 diff --git a/lib/symspec2.f90 b/lib/symspec2.f90 index 1120b52fd..92dc5715a 100644 --- a/lib/symspec2.f90 +++ b/lib/symspec2.f90 @@ -10,6 +10,7 @@ subroutine symspec2(c5,nz3,nsps8,nspsd,fsample,freq,drift,snrdb,schk, & real ss2(0:8,85) real ss3(0:7,69) include 'jt9sync.f90' + data scale/10.0/ aa(1)=-1500.0/nsps8 aa(2)=0. @@ -32,12 +33,9 @@ subroutine symspec2(c5,nz3,nsps8,nspsd,fsample,freq,drift,snrdb,schk, & enddo enddo -!### -! write(30) freq,drift,ss2 -! call flush(30) call chkss2(ss2,freq,drift,schk) if(schk.lt.2.0) go to 900 -!### + ss=0. sig=0. do j=1,69 @@ -77,7 +75,7 @@ subroutine symspec2(c5,nz3,nsps8,nspsd,fsample,freq,drift,snrdb,schk, & endif k=k+1 - i4=nint(10.0*(r1-r0)) + i4=nint(scale*(r1-r0)) if(i4.lt.-127) i4=-127 if(i4.gt.127) i4=127 i4=i4+128 diff --git a/mainwindow.cpp b/mainwindow.cpp index ce7809d48..cc3d44c8c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------------- MainWindow +//-------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h"