From 073a22125a32f81ec45f45025b19664cf78624b8 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 14 Feb 2019 14:09:22 -0500 Subject: [PATCH] Minor cleanup: debugging a problem with FT4 decoding. --- CMakeLists.txt | 1 - lib/ft4/clockit.f90 | 5 +++-- lib/ft4/ft4_decode.f90 | 9 ++++----- lib/ft4/ft4d.f90 | 12 +++++------- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5cab4232..01f4959c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -512,7 +512,6 @@ set (wsjt_FSRCS lib/mskrtd.f90 lib/ft4/ft4sim.f90 lib/ft4/ft4sim_mult.f90 - lib/ft4/ft4d.f90 lib/ft4/ft4_decode.f90 lib/ft4/ft4_downsample.f90 lib/77bit/my_hash.f90 diff --git a/lib/ft4/clockit.f90 b/lib/ft4/clockit.f90 index a6306409e..eb3e7d8b1 100644 --- a/lib/ft4/clockit.f90 +++ b/lib/ft4/clockit.f90 @@ -14,6 +14,7 @@ subroutine clockit(dname,k) data first/.true./,eps/0.000001/,ntrace/0/ data level/0/,nmax/0/,space/' '/ data limtrace/0/,lu/29/,ntimer/1/ +! data limtrace/1000000/,lu/29/,ntimer/1/ save if(ntimer.eq.0) return @@ -56,8 +57,8 @@ subroutine clockit(dname,k) endif ntrace=ntrace+1 - if(ntrace.lt.limtrace) write(lu,1020) ntrace,dname,k,level,nparent(n) -1020 format(i5,': ',a8,3i5) + if(ntrace.lt.limtrace) write(28,1020) ntrace,dname,k,level,nparent(n) +1020 format(i8,': ',a8,3i5) return ! Write out the timer statistics diff --git a/lib/ft4/ft4_decode.f90 b/lib/ft4/ft4_decode.f90 index 366365fe7..a65b96417 100644 --- a/lib/ft4/ft4_decode.f90 +++ b/lib/ft4/ft4_decode.f90 @@ -16,7 +16,7 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & character*6 hhmmss complex cd2(0:NMAX/NDOWN-1) !Complex waveform - complex cds(0:NMAX/NDOWN-1) !Complex waveform +! complex cds(0:NMAX/NDOWN-1) !Complex waveform complex cb(0:NMAX/NDOWN-1) complex cd(0:NN*NSS-1) !Complex waveform complex ctwk(4*NSS),ctwk2(4*NSS) @@ -66,8 +66,8 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & 1,0,0,1,0,1,1,0,0,0,0,1,0,0,0,1,0,1,0,0,1,1,1,1,0,0,1,0,1, & 0,1,0,1,0,1,1,0,1,1,1,1,1,0,0,0,1,0,1/ save fs,dt,tt,txt,twopi,h,one,first,nrxx,linex,apbits,nappasses,naptypes, & - mycall0,hiscall0,ncontest0,msg0 - + mycall0,hiscall0,msg0 + call clockit('ft4_deco',0) hhmmss=cdatetime0(8:13) @@ -333,7 +333,6 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & apmag=maxval(abs(llra))*1.1 npasses=3+nappasses(nQSOProgress) if(ncontest.ge.5) npasses=3 ! Don't support Fox and Hound - do ipass=1,npasses if(ipass.eq.1) llr=llra if(ipass.eq.2) llr=llrb @@ -480,7 +479,7 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & nrx=-1 if(index(message,'CQ ').eq.1) nrx=1 if((index(message,trim(mycall)//' ').eq.1) .and. & - (index(message,' '//trim(hiscall)//' ').ge.4)) then + (index(message,' '//trim(hiscall)//' ').ge.4)) then if(index(message,' 559 ').gt.8) nrx=2 !### Not right ! if(index(message,' R 559 ').gt.8) nrx=3 !### Not right ! if(index(message,' RR73 ').gt.8) nrx=4 diff --git a/lib/ft4/ft4d.f90 b/lib/ft4/ft4d.f90 index 560a68824..a4d77d461 100644 --- a/lib/ft4/ft4d.f90 +++ b/lib/ft4/ft4d.f90 @@ -5,7 +5,6 @@ program ft4d character*8 arg character*17 cdatetime character*512 data_dir - character*11 datetime character*37 decodes(100) character*16 fname character*12 mycall @@ -48,9 +47,10 @@ program ft4d read(arg,*) nQSOProgress iarg=iarg+2 endif - nfa=200 - nfb=3000 - ncontest=0 + nfa=0 + nfb=4200 + ncontest=4 + ndecodes=0 nfqso=1500 mycall="K9AN" hiscall="K1JT" @@ -60,10 +60,8 @@ program ft4d j2=index(infile,'.wav') open(10,file=infile,status='old',access='stream') read(10,end=999) ihdr,iwave - read(infile(j2-4:j2-1),*) nutc - datetime=infile(j2-11:j2-1) - cdatetime=' '//datetime close(10) + cdatetime=infile(1:13)//'.000' call ft4_decode(cdatetime,0.0,nfa,nfb,nQSOProgress,ncontest,nfqso,iwave, & ndecodes,mycall,hiscall,nrx,line,data_dir)