From 8f7221825fffe7289902c03b416f87cac3573cbf Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Tue, 17 Mar 2020 08:51:37 -0500 Subject: [PATCH] First cut at setting up Fast/Normal/Deep parameters. --- lib/ft8/bpdecode174_91.f90 | 3 ++- lib/ft8/ft8b.f90 | 8 ++++---- lib/ft8_decode.f90 | 13 +++++++------ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/ft8/bpdecode174_91.f90 b/lib/ft8/bpdecode174_91.f90 index 78809f19e..12a5b347b 100644 --- a/lib/ft8/bpdecode174_91.f90 +++ b/lib/ft8/bpdecode174_91.f90 @@ -1,4 +1,4 @@ -subroutine bpdecode174_91(llr,apmask,maxiterations,message77,cw,nharderror,iter) +subroutine bpdecode174_91(llr,apmask,maxiterations,message77,cw,nharderror,iter,ncheck) ! ! A log-domain belief propagation decoder for the (174,91) code. ! @@ -76,6 +76,7 @@ do iter=0,maxiterations ! write(*,*) iter,ncheck,nd,ncnt if( ncnt .ge. 5 .and. iter .ge. 10 .and. ncheck .gt. 15) then nharderror=-1 + return endif endif diff --git a/lib/ft8/ft8b.f90 b/lib/ft8/ft8b.f90 index de13461a9..52ce7b897 100644 --- a/lib/ft8/ft8b.f90 +++ b/lib/ft8/ft8b.f90 @@ -261,7 +261,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,nzhsym,lapon, & else npasses=4 endif - if(nzhsym.lt.50) npasses=3 + if(nzhsym.lt.50) npasses=4 do ipass=1,npasses llrz=llra @@ -402,11 +402,11 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,nzhsym,lapon, & cw=0 call timer('bpd174_91 ',0) call bpdecode174_91(llrz,apmask,max_iterations,message77,cw,nharderrors, & - niterations) + niterations,ncheck) call timer('bpd174_91 ',1) dmin=0.0 - if(ndepth.ge.2 .and. nharderrors.lt.0) then - ndeep=3 + if(nharderrors.lt.0 .and. ncheck.le.30 .and. ndepth.ge.2) then + ndeep=ndepth if(abs(nfqso-f1).le.napwid .or. abs(nftx-f1).le.napwid .or. ncontest.eq.7) then ndeep=4 endif diff --git a/lib/ft8_decode.f90 b/lib/ft8_decode.f90 index 71b39ab7b..260d34740 100644 --- a/lib/ft8_decode.f90 +++ b/lib/ft8_decode.f90 @@ -124,24 +124,26 @@ contains endif ! For now: -! ndepth=1: no subtraction, 1 pass, belief propagation only +! ndepth=1: subtraction, 3 passes, bp (no subtract refinement) ! ndepth=2: subtraction, 3 passes, bp+osd (no subtract refinement) ! ndepth=3: subtraction, 3 passes, bp+osd - if(ndepth.eq.1) npass=1 - if(ndepth.ge.2) npass=3 + npass=3 do ipass=1,npass newdat=.true. syncmin=1.3 if(ipass.eq.1) then lsubtract=.true. - if(ndepth.eq.1) lsubtract=.false. + ndeep=ndepth + if(ndepth.eq.3) ndeep=2 elseif(ipass.eq.2) then n2=ndecodes if(ndecodes.eq.0) cycle lsubtract=.true. + ndeep=ndepth elseif(ipass.eq.3) then if((ndecodes-n2).eq.0) cycle lsubtract=.true. + ndeep=3 endif call timer('sync8 ',0) maxc=MAXCAND @@ -154,7 +156,7 @@ contains xdt=candidate(2,icand) xbase=10.0**(0.1*(sbase(nint(f1/3.125))-40.0)) call timer('ft8b ',0) - call ft8b(dd,newdat,nQSOProgress,nfqso,nftx,ndepth,nzhsym,lft8apon, & + call ft8b(dd,newdat,nQSOProgress,nfqso,nftx,ndeep,nzhsym,lft8apon, & lapcqonly,napwid,lsubtract,nagain,ncontest,iaptype,mycall12, & hiscall12,sync,f1,xdt,xbase,apsym2,aph10,nharderrors,dmin, & nbadcrc,iappass,iera,msg37,xsnr,itone) @@ -165,7 +167,6 @@ contains if(nbadcrc.eq.0) then ldupe=.false. do id=1,ndecodes -! if(msg37.eq.allmessages(id).and.nsnr.le.allsnrs(id)) ldupe=.true. if(msg37.eq.allmessages(id)) ldupe=.true. enddo if(.not.ldupe) then