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 36f257a60..bab83b35e 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) @@ -141,6 +141,8 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & nohiscall=.true. endif message=trim(mycall)//' '//trim(hiscall0)//' RR73' + i3=-1 + n3=-1 call pack77(message,i3,n3,c77) call unpack77(c77,1,msgsent,unpk77_success) if(i3.ne.1 .or. (message.ne.msgsent) .or. .not.unpk77_success) go to 10 @@ -337,7 +339,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 @@ -484,7 +485,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/ft4_downsample.f90 b/lib/ft4/ft4_downsample.f90 index 48368ab9b..37b4fbc29 100644 --- a/lib/ft4/ft4_downsample.f90 +++ b/lib/ft4/ft4_downsample.f90 @@ -25,7 +25,8 @@ subroutine ft4_downsample(iwave,f0,c) pi=4.0*atan(1.0) window(0:iwt-1) = 0.5*(1+cos(pi*(/(i,i=iwt-1,0,-1)/)/iwt)) window(iwt:iwt+iwf-1)=1.0 - window(iwt+iwf:2*iwt+iwf-1) = 0.5*(1+cos(pi*(/(i,i=0,iwt)/)/iwt)) +! window(iwt+iwf:2*iwt+iwf-1) = 0.5*(1+cos(pi*(/(i,i=0,iwt)/)/iwt)) + window(iwt+iwf:2*iwt+iwf-1) = 0.5*(1+cos(pi*(/(i,i=0,iwt-1)/)/iwt)) window(2*iwt+iwf:)=0.0 iws = baud / df window=cshift(window,iws) diff --git a/lib/ft4/ft4d.f90 b/lib/ft4/ft4d.f90 index 560a68824..d7583f3cc 100644 --- a/lib/ft4/ft4d.f90 +++ b/lib/ft4/ft4d.f90 @@ -1,22 +1,16 @@ program ft4d include 'ft4_params.f90' - character*8 arg character*17 cdatetime character*512 data_dir - character*11 datetime - character*37 decodes(100) - character*16 fname character*12 mycall character*12 hiscall character*80 infile character*61 line - real*8 fMHz - integer ihdr(11) - integer*2 iwave(NMAX) !Generated full-length waveform + integer*2 iwave(180000) !15*12000 fs=12000.0/NDOWN !Sample rate dt=1/fs !Sample interval after downsample (s) @@ -48,9 +42,10 @@ program ft4d read(arg,*) nQSOProgress iarg=iarg+2 endif - nfa=200 - nfb=3000 - ncontest=0 + nfa=0 + nfb=4224 + ncontest=4 + ndecodes=0 nfqso=1500 mycall="K9AN" hiscall="K1JT" @@ -59,20 +54,23 @@ program ft4d call getarg(ifile,infile) 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 + read(10) ihdr + npts=ihdr(11)/2 + read(10) iwave(1:npts) 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) - - do idecode=1,ndecodes - call get_ft4msg(idecode,nrx,line) - write(*,'(a61)') line - enddo - enddo !files + nsteps=(npts-60000)/3456 + 1 + do n=1,nsteps + i0=(n-1)*3456 + 1 + call ft4_decode(cdatetime,0.0,nfa,nfb,nQSOProgress,ncontest, & + nfqso,iwave(i0),ndecodes,mycall,hiscall,nrx,line,data_dir) + do idecode=1,ndecodes + call get_ft4msg(idecode,nrx,line) + write(*,'(a61)') line + enddo + enddo !steps + enddo !files write(*,1120) 1120 format("")