From 4a68d3c4cfc24a87781bbedfc1c170745c787751 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 5 Nov 2021 09:21:49 -0400 Subject: [PATCH] Adjustments to FT8 a7 code. Still more to come ... --- lib/ft8/ft8c.f90 | 9 +++------ lib/ft8_a7.f90 | 2 +- lib/ft8_decode.f90 | 23 +++++++++++++++-------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lib/ft8/ft8c.f90 b/lib/ft8/ft8c.f90 index 55a94f895..a7d1ccb90 100644 --- a/lib/ft8/ft8c.f90 +++ b/lib/ft8/ft8c.f90 @@ -1,4 +1,5 @@ -subroutine ft8c(dd0,newdat,call_1,call_2,grid4,f1,xdt,nharderrors,dmin,msg37,xsnr) +subroutine ft8c(dd0,newdat,call_1,call_2,grid4,xdt,f1,nharderrors,dmin, & + msg37,xsnr) use crc use timer_module, only: timer @@ -49,7 +50,6 @@ subroutine ft8c(dd0,newdat,call_1,call_2,grid4,f1,xdt,nharderrors,dmin,msg37,xsn if(call_1(1:3).eq.'CQ ') std_1=.true. call stdcall(call_2,std_2) - max_iterations=30 nharderrors=-1 fs2=12000.0/NDOWN dt2=1.0/fs2 @@ -130,10 +130,7 @@ subroutine ft8c(dd0,newdat,call_1,call_2,grid4,f1,xdt,nharderrors,dmin,msg37,xsn enddo ! hard sync sum - max is 21 nsync=is1+is2+is3 - if(nsync .le. 6) then ! bail out - nbadcrc=1 - return - endif +! if(nsync .le. 6) return ! bail out do nsym=1,3 nt=2**(3*nsym) diff --git a/lib/ft8_a7.f90 b/lib/ft8_a7.f90 index 7a73d7655..71cb2eb95 100644 --- a/lib/ft8_a7.f90 +++ b/lib/ft8_a7.f90 @@ -32,7 +32,7 @@ subroutine ft8_a7_save(nutc,dt,f,msg) ichar(g4(2:2)).ge.ichar('A') .and. ichar(g4(2:2)).le.ichar('R') .and. & ichar(g4(3:3)).ge.ichar('0') .and. ichar(g4(3:3)).le.ichar('9') .and. & ichar(g4(4:4)).ge.ichar('0') .and. ichar(g4(4:4)).le.ichar('9')) - + j=mod(nutc/5,2) !j is 0 or 1 for odd/even sequence jseq=j diff --git a/lib/ft8_decode.f90 b/lib/ft8_decode.f90 index 3a11bd976..0c4ee3768 100644 --- a/lib/ft8_decode.f90 +++ b/lib/ft8_decode.f90 @@ -77,6 +77,8 @@ contains if(nutc0.eq.-1) then msg0=' ' + dt0=0. + f0=0. endif if(nutc.ne.nutc0) then ! New UTC. Move previously saved 'a7' data from k=1 to k=0 @@ -87,8 +89,9 @@ contains ndec(jseq,0)=iz ndec(jseq,1)=0 nutc0=nutc + dt0(:,jseq,1)=0. + f0(:,jseq,1)=0. endif -! write(44,*) 'AAA',nutc,nzhsym if(ndepth.eq.1 .and. nzhsym.lt.50) then ndec_early=0 @@ -218,6 +221,10 @@ contains if(emedelay.ne.0) xdt=xdt+2.0 call this%callback(sync,nsnr,xdt,f1,msg37,iaptype,qual) call ft8_a7_save(nutc,xdt,f1,msg37) +! ii=ndec(jseq,1) +! write(41,3041) jseq,ii,nint(f0(ii,jseq,0)),msg0(ii,jseq,0)(1:22),& +! nint(f0(ii,jseq,1)),msg0(ii,jseq,1)(1:22) +!3041 format(3i5,2x,a22,i5,2x,a22) endif endif call timestamp(tsec,tseq,ctime) @@ -230,7 +237,6 @@ contains if(nzhsym.lt.50) ndec_early=ndecodes 900 continue -! if(nzhsym.eq.50) print*,'AA0',jseq,ndec(0,0),ndec(0,1) if(nzhsym.eq.50 .and. ndec(jseq,0).ge.1) then newdat=.true. do i=1,ndec(jseq,0) @@ -245,21 +251,22 @@ contains grid4=msg37(i2+1:i2+4) if(grid4.eq.'RR73' .or. index(grid4,'+').gt.0 .or. & index(grid4,'-').gt.0) grid4=' ' -! print*,'aa ',call_1,call_2,grid4,' ',msg37 - msg37=' ' xdt=dt0(i,jseq,0) f1=f0(i,jseq,0) - write(50,3050) i,sum(dd),newdat,mycall12,hiscall12,xdt,f1 -3050 format(i3,f10.3,L3,2x,2a12,f7.2,f7.1) + msg37=' ' call timer('ft8c ',0) - call ft8c(dd,newdat,call_1,call_2,grid4,f1,xdt,nharderrors,dmin,msg37,xsnr) + call ft8c(dd,newdat,call_1,call_2,grid4,xdt,f1,nharderrors, & + dmin,msg37,xsnr) call timer('ft8c ',1) - if(nharderrors.ge.0 .and. nharderrors.le.44 .and. dmin.le.80.0) then +! write(51,3051) i,xdt,nint(f1),nharderrors,dmin,call_1,call_2,grid4 +!3051 format(i3,f7.2,2i5,f7.1,1x,a12,a12,1x,a4) + if(nharderrors.ge.0 .and. dmin.le.80.0) then if(associated(this%callback)) then nsnr=xsnr iaptype=7 qual=1.0 call this%callback(sync,nsnr,xdt,f1,msg37,iaptype,qual) + call ft8_a7_save(nutc,xdt,f1,msg37) endif ! write(*,3901) xdt,nint(f1),nharderrors,dmin,trim(msg37) !3901 format('$$$',f6.1,i5,i5,f7.1,1x,a)