From 42bdbf0de7070e702acbbcf370584db7815a5200 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Thu, 7 Jul 2016 23:18:40 +0000 Subject: [PATCH] Fix what I broke. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6891 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/detectmsk144.f90 | 2 +- lib/detectmsk32.f90 | 40 +++++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/lib/detectmsk144.f90 b/lib/detectmsk144.f90 index 8508cc390..12941b387 100644 --- a/lib/detectmsk144.f90 +++ b/lib/detectmsk144.f90 @@ -246,7 +246,7 @@ subroutine detectmsk144(cbig,n,pchk_file,lines,nmessages,nutc) if( ibb .le. 3 ) ibb=ibb-1 if( ibb .gt. 3 ) ibb=ibb-7 - do id=1,1 ! slicer dither. bb is very good - may be able to remove this. + do id=1,3 ! slicer dither. bb is very good - may be able to remove this. if( id .eq. 1 ) is=0 if( id .eq. 2 ) is=-1 if( id .eq. 3 ) is=1 diff --git a/lib/detectmsk32.f90 b/lib/detectmsk32.f90 index 956c7ac52..9f9dbb66a 100644 --- a/lib/detectmsk32.f90 +++ b/lib/detectmsk32.f90 @@ -107,7 +107,7 @@ subroutine detectmsk32(cbig,n,mycall,partnercall,lines,nmessages,nutc) likelymessages(irpt)=ig ! write(*,*) irpt,hashmsg,ig,ig24(ig) enddo - qsocontext=.true. + qsocontext=.false. ! Fill the detmet, detferr arrays nstepsize=48 ! 4ms steps @@ -428,31 +428,33 @@ subroutine detectmsk32(cbig,n,mycall,partnercall,lines,nmessages,nutc) enddo 999 continue msgreceived=' ' - if( ( ihammd(imsgbest)+nbadsyncbest .le. 4 ) .and. ( (cdratbest .gt. 50.0) .and. (cdbest .le. 0.05) ) ) then - if( qsocontext ) then - nrxrpt=iand(likelymessages(imsgbest),31) - nrxhash=(likelymessages(imsgbest)-nrxrpt)/32 - imessage=likelymessages(imsgbest) - else - nrxrpt=iand(imsgbest,31) - nrxhash=(imsgbest-nrxrpt)/32 - imessage=imsgbest - endif + if( imsgbest .gt. 0 ) then + if( ( ihammd(imsgbest)+nbadsyncbest .le. 4 ) .and. (cdratbest .gt. 50.0) .and. (cdbest .le. 0.05) ) then + if( qsocontext ) then + nrxrpt=iand(likelymessages(imsgbest),31) + nrxhash=(likelymessages(imsgbest)-nrxrpt)/32 + imessage=likelymessages(imsgbest) + else + nrxrpt=iand(imsgbest,31) + nrxhash=(imsgbest-nrxrpt)/32 + imessage=imsgbest + endif ! See if this message has a hash that is expected for a message sent to mycall by partnercall - hashmsg=trim(mycall)//' '//trim(partnercall)//' '//rpt(nrxrpt) - call fmtmsg(hashmsg,iz) - call hash(hashmsg,22,ihash) - ihash=iand(ihash,127) - if( nrxhash .eq. ihash ) then - nmessages=1 - write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(mycall),trim(partnercall),">",rpt(nrxrpt) - write(lines(nmessages),1020) nutc,nsnr,t0,nint(fest),msgreceived + hashmsg=trim(mycall)//' '//trim(partnercall)//' '//rpt(nrxrpt) + call fmtmsg(hashmsg,iz) + call hash(hashmsg,22,ihash) + ihash=iand(ihash,127) + if( nrxhash .eq. ihash ) then + nmessages=1 + write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(mycall),trim(partnercall),">",rpt(nrxrpt) + write(lines(nmessages),1020) nutc,nsnr,t0,nint(fest),msgreceived 1020 format(i6.6,i4,f5.1,i5,' & ',a22) ! write(*,1022) nutc,ipbest,times(ipbest),snrs(ipbest),fest,nrxrpt,nrxhash, & ! rpt(nrxrpt),imessage,ig24(imessage),ihammd(imsgbest), & ! cdbest,cdratbest,nbadsyncbest,ipkbest,idbest,idfbest,iavbest,iphabest + endif endif endif !1022 format(i4.4,2x,i4,f8.3,f8.2,f8.2,i6,i6,a6,i8,i10,i4,f8.2,f8.2,i5,i5,i5,i5,i5,i5)