From 43c38de8846a19aab9fd8e07d4e77353eb3a0a75 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 26 Mar 2019 14:00:32 -0400 Subject: [PATCH] Minor tweaks for FT4 debugging and possible tuning. --- lib/ft4/ft4_decode.f90 | 8 +++----- lib/ft4/ft4d.f90 | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/ft4/ft4_decode.f90 b/lib/ft4/ft4_decode.f90 index 63cc6753e..4e4959b37 100644 --- a/lib/ft4/ft4_decode.f90 +++ b/lib/ft4/ft4_decode.f90 @@ -265,7 +265,7 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & ip=maxloc(s4(:,k+99)) if(icos4d(k-1).eq.(ip(1)-1)) is4=is4+1 enddo - nsync=is1+is2+is3+is4 !Number of hard sync errors, 0-16 + nsync=is1+is2+is3+is4 !Number of correct hard sync symbols, 0-16 if(smax .lt. 0.7 .or. nsync .lt. 8) cycle do nseq=1,3 !Try coherent sequences of 1, 2, and 4 symbols @@ -460,17 +460,15 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & fname=data_dir(1:l1+1)//'all_ft4.txt' open(24,file=trim(fname),status='unknown',position='append') write(24,1002) cdatetime0,nsnr,tsig,nint(freq),message, & - nharderror,nsync_qual,ipass,niterations,iaptype + nharderror,nsync_qual,ipass,niterations,iaptype,nsync if(hhmmss.eq.' ') write(*,1002) cdatetime0,nsnr, & tsig,nint(freq),message,nharderror,nsync_qual,ipass, & niterations,iaptype -1002 format(a17,i4,f5.1,i5,' Rx ',a37,5i5) +1002 format(a17,i4,f5.1,i5,' Rx ',a37,6i4) close(24) linex(ndecodes)=line if(ibest.ge.ibmax-15) msg0=message !Possible dupe candidate - exit - endif enddo !Sequence estimation enddo !Candidate list diff --git a/lib/ft4/ft4d.f90 b/lib/ft4/ft4d.f90 index f8e6dab71..13ed8d2cc 100644 --- a/lib/ft4/ft4d.f90 +++ b/lib/ft4/ft4d.f90 @@ -57,10 +57,10 @@ program ft4d j2=index(infile,'.wav') open(10,file=infile,status='old',access='stream') read(10) ihdr - npts=ihdr(11)/2 + npts=min(ihdr(11)/2,180000) read(10) iwave(1:npts) close(10) - cdatetime=infile(1:13)//'.000' + cdatetime=infile(j2-13:j2)//'000' istep=3456 nsteps=(npts-52800)/istep + 1