From 925cd0908563c1e457384a54c8a79fed8402f824 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Thu, 20 Jul 2017 21:08:36 +0000 Subject: [PATCH] Only print dupes if SNR is higher than what has already been printed. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7931 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/ft8_decode.f90 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/ft8_decode.f90 b/lib/ft8_decode.f90 index 2c6bdd054..0705824ba 100644 --- a/lib/ft8_decode.f90 +++ b/lib/ft8_decode.f90 @@ -36,12 +36,14 @@ contains real candidate(3,200) real dd(15*12000) logical, intent(in) :: nagain - logical newdat,lsubtract + logical newdat,lsubtract,ldupe character*12 mycall12, hiscall12 character*6 hisgrid6 integer*2 iwave(15*12000) integer apsym(KK) character datetime*13,message*22 + character*22 allmessages(100) + integer allsnrs(100) save s,dd this%callback => callback @@ -52,6 +54,10 @@ contains dd=iwave + ndecodes=0 + allmessages=' ' + allsnrs=0 + ! For now: ! ndepth=1: no subtraction, 1 pass, belief propagation only ! ndepth=2: subtraction, 2 passes, belief propagation only @@ -87,11 +93,20 @@ contains call jtmsg(message,iflag) if(iand(iflag,16).ne.0) message(22:22)='?' if(iand(iflag,15).eq.0) then + ldupe=.false. + do id=1,ndecodes + if(message.eq.allmessages(id).and.nsnr.le.allsnrs(id)) ldupe=.true. + enddo + if(.not.ldupe) then + ndecodes=ndecodes+1 + allmessages(ndecodes)=message + allsnrs(ndecodes)=nsnr + endif ! write(81,1004) nutc,ncand,icand,ipass,iaptype,iap,iera, & ! iflag,nharderrors,dmin,hd,min(sync,999.0),nint(xsnr), & ! xdt,nint(f1),message ! flush(81) - if(associated(this%callback)) then + if(.not.ldupe .and. associated(this%callback)) then call this%callback(sync,nsnr,xdt,f1,iap,iera,message) endif else