diff --git a/lib/msk144d2.f90 b/lib/msk144d2.f90 index 19a25a038..88f1c436a 100644 --- a/lib/msk144d2.f90 +++ b/lib/msk144d2.f90 @@ -46,7 +46,7 @@ program msk144d2 bShMsgs=.false. bcontest=.false. brxequal=.false. - bswl=.true. + bswl=.false. do call getopt('c:d:ef:hm:n:rs',long_options,c,optarg,narglen,nstat,noffset,nremain,.true.) diff --git a/lib/msk40decodeframe.f90 b/lib/msk40decodeframe.f90 index 7e16d2a08..557d7f956 100644 --- a/lib/msk40decodeframe.f90 +++ b/lib/msk40decodeframe.f90 @@ -20,7 +20,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,bswl,nhasharray, & real softbits(40) real llr(32) logical first - logical bswl + logical*1 bswl data first/.true./ data s8r/1,0,1,1,0,0,0,1/ data mycall0/'dummy'/,hiscall0/'dummy'/ @@ -57,9 +57,13 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,bswl,nhasharray, & if(mycall.ne.mycall0 .or. hiscall.ne.hiscall0) then hashmsg=trim(mycall)//' '//trim(hiscall) - call fmtmsg(hashmsg,iz) - call hash(hashmsg,22,ihash) - ihash=iand(ihash,4095) + if( hashmsg .ne. ' ' ) then + call fmtmsg(hashmsg,iz) + call hash(hashmsg,22,ihash) + ihash=iand(ihash,4095) + else + ihash=9999 ! so that it can never match a received hash + endif mycall0=mycall hiscall0=hiscall endif @@ -130,7 +134,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,bswl,nhasharray, & nrxrpt=iand(imsg,15) nrxhash=(imsg-nrxrpt)/16 if(nhammd.le.4 .and. cord .lt. 0.65 .and. nrxhash.eq.ihash) then -!write(*,*) 'decodeframe ',nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma +!write(*,*) 'decodeframe 1',nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma nsuccess=1 write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(mycall), & trim(hiscall),">",rpt(nrxrpt) @@ -139,21 +143,21 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,bswl,nhasharray, & do i=1,nrecent do j=i+1,nrecent if( nrxhash .eq. nhasharray(i,j) ) then - nsuccess=1 + nsuccess=2 write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(recent_calls(i)), & trim(recent_calls(j)),">",rpt(nrxrpt) -!write(*,*) 'decodeframe ',nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma +!write(*,*) 'decodeframe 2',nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma elseif( nrxhash .eq. nhasharray(j,i) ) then - nsuccess=1 + nsuccess=2 write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(recent_calls(j)), & trim(recent_calls(i)),">",rpt(nrxrpt) -!write(*,*) 'decodeframe ',nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma +!write(*,*) 'decodeframe 3',nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma endif enddo enddo if(nsuccess.eq.0 .and. nhammd.le.2 .and. cord.lt.0.40 .and. xsnr.gt.0.0 ) then -!write(*,*) 'decodeframe ',nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma - nsuccess=1 +!write(*,*) 'decodeframe 4',bswl,nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma + nsuccess=3 write(msgreceived,'(a1,i4.4,a1,1x,a4)') "<",nrxhash,">",rpt(nrxrpt) endif endif diff --git a/lib/msk40spd.f90 b/lib/msk40spd.f90 index 61ccc110d..1831e0235 100644 --- a/lib/msk40spd.f90 +++ b/lib/msk40spd.f90 @@ -21,7 +21,7 @@ subroutine msk40spd(cbig,n,ntol,mycall,hiscall,bswl,nhasharray,recent_calls, & integer nstart(MAXCAND) integer nhasharray(nrecent,nrecent) logical ismask(NFFT) - logical bswl + logical*1 bswl real detmet(-2:MAXSTEPS+3) real detmet2(-2:MAXSTEPS+3) real detfer(MAXSTEPS) @@ -187,7 +187,7 @@ subroutine msk40spd(cbig,n,ntol,mycall,hiscall,bswl,nhasharray,recent_calls, & tret=(nstart(icand)+NSPM/2)/fs fret=fest navg=sum(navmask) - nsuccess=1 + nsuccess=ndecodesuccess return endif enddo diff --git a/lib/mskrtd.f90 b/lib/mskrtd.f90 index db18e0a7b..c60e5763f 100644 --- a/lib/mskrtd.f90 +++ b/lib/mskrtd.f90 @@ -39,6 +39,7 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, & logical*1 first logical*1 trained logical*1 bshdecode + logical*1 noprint data first/.true./ data iavpatterns/ & @@ -106,7 +107,7 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, & call msk40spd(cdat,np,ntol,mycall(1:6),hiscall(1:6),bswl,nhasharray, & recent_calls,nrecent,nsuccess,msgreceived,fc,fest,tdec,navg) endif - if( nsuccess .eq. 1 ) then + if( nsuccess .ge. 1 ) then tdec=tsec+tdec ipk=0 is=0 @@ -193,9 +194,13 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, & ncorrected=0 eyeopening=0.0 endif - write(line,1020) nutc0,nsnr,tdec,nint(fest),decsym,msgreceived, & - navg,ncorrected,eyeopening,char(0) -1020 format(i6.6,i4,f5.1,i5,a3,a22,i2,i3,f5.1,a1) + noprint = bswl .and. & + ((nsuccess.eq.2 .and. nsnr.lt.-3).or.(nsuccess.eq.3 .and. nsnr.lt.-3)) + if( .not.noprint ) then + write(line,1020) nutc0,nsnr,tdec,nint(fest),decsym,msgreceived, & + navg,ncorrected,eyeopening,char(0) +1020 format(i6.6,i4,f5.1,i5,a3,a22,i2,i3,f5.1,a1) + endif endif 999 tsec0=tsec