Experimental change to Sh message hashing scheme. Not yet tested. Not for use on the air and not compatible with current Sh messages.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7195 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Steven Franke 2016-10-18 01:31:53 +00:00
parent e4efe55531
commit 532afa0d56
3 changed files with 22 additions and 15 deletions

View File

@ -21,7 +21,7 @@ subroutine detectmsk40(cbig,n,mycall,hiscall,lines,nmessages, &
complex bb(6)
integer s8(8),s8r(8),hardbits(40)
integer, dimension(1) :: iloc
integer nhashes(0:15)
! integer nhashes(0:15)
integer indices(MAXSTEPS)
integer ipeaks(10)
integer*1 cw(32)
@ -53,7 +53,7 @@ subroutine detectmsk40(cbig,n,mycall,hiscall,lines,nmessages, &
data s8r/1,0,1,1,0,0,0,1/
! codeword for the message <K9AN K1JT> RRR
data testcw/0,1,0,0,0,1,0,1,0,0,1,1,1,1,0,1,0,1,1,1,1,1,0,0,0,0,0,0,1,1,1,0/
save df,first,cb,cbr,fs,nhashes,pi,twopi,dt,s8,s8r,rcw,pp,nmatchedfilter,rpt,mycall0,hiscall0
save df,first,cb,cbr,fs,pi,twopi,dt,s8,s8r,rcw,pp,nmatchedfilter,rpt,mycall0,hiscall0
if(first) then
nmatchedfilter=1
@ -96,12 +96,14 @@ subroutine detectmsk40(cbig,n,mycall,hiscall,lines,nmessages, &
endif
if(mycall.ne.mycall0 .or. hiscall.ne.hiscall0) then
do i=0,15
hashmsg=trim(mycall)//' '//trim(hiscall)//' '//rpt(i)
! do i=0,15
! hashmsg=trim(mycall)//' '//trim(hiscall)//' '//rpt(i)
hashmsg=trim(mycall)//' '//trim(hiscall)
call fmtmsg(hashmsg,iz)
call hash(hashmsg,22,ihash)
nhashes(i)=iand(ihash,4095)
enddo
! nhashes(i)=iand(ihash,4095)
ihash=iand(ihash,4095)
! enddo
mycall0=mycall
hiscall0=hiscall
endif
@ -397,7 +399,8 @@ subroutine detectmsk40(cbig,n,mycall,hiscall,lines,nmessages, &
enddo
nrxrpt=iand(imsg,15)
nrxhash=(imsg-nrxrpt)/16
if( nhammd .le. 5 .and. cord .lt. 1.7 .and. nrxhash .eq. nhashes(nrxrpt) ) then
! if( nhammd .le. 5 .and. cord .lt. 1.7 .and. nrxhash .eq. nhashes(nrxrpt) ) then
if( nhammd .le. 5 .and. cord .lt. 1.7 .and. nrxhash .eq. ihash ) then
fest=1500+ferr+ferr2+deltaf
!write(14,'(i6.6,11i6,f7.1,f7.1)') nutc,ip,ipk,id,idf,iav,ipha,niterations,nbadsync,nrxrpt,ncalls,nhammd,cord,xsnr
nhashflag=1

View File

@ -28,7 +28,8 @@ subroutine genmsk40(msg,msgsent,ichk,itone,itype)
10 irpt=i !Report index, 0-15
if(ichk.lt.10000) then
hashmsg=msg(2:i1-1)//' '//crpt
! hashmsg=msg(2:i1-1)//' '//crpt
hashmsg=msg(2:i1-1)
call hash(hashmsg,22,ihash)
ihash=iand(ihash,4095) !12-bit hash
ig=16*ihash + irpt !4-bit report

View File

@ -11,7 +11,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
integer*1 cw(32)
integer*1 decoded(16)
integer s8r(8),hardbits(40)
integer nhashes(0:15)
! integer nhashes(0:15)
real*8 dt, fs, pi, twopi
real cbi(42),cbq(42)
real pp(12)
@ -24,7 +24,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
data rpt/"-03 ","+00 ","+03 ","+06 ","+10 ","+13 ","+16 ", &
"R-03","R+00","R+03","R+06","R+10","R+13","R+16", &
"RRR ","73 "/
save first,cb,fs,nhashes,pi,twopi,dt,s8r,pp,rpt,mycall0,hiscall0
save first,cb,fs,pi,twopi,dt,s8r,pp,rpt,mycall0,hiscall0
if(first) then
! define half-sine pulse and raised-cosine edge window
@ -53,12 +53,14 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
endif
if(mycall.ne.mycall0 .or. hiscall.ne.hiscall0) then
do i=0,15
hashmsg=trim(mycall)//' '//trim(hiscall)//' '//rpt(i)
! do i=0,15
! hashmsg=trim(mycall)//' '//trim(hiscall)//' '//rpt(i)
hashmsg=trim(mycall)//' '//trim(hiscall)
call fmtmsg(hashmsg,iz)
call hash(hashmsg,22,ihash)
nhashes(i)=iand(ihash,4095)
enddo
ihash=iand(ihash,4095)
! nhashes(i)=iand(ihash,4095)
! enddo
mycall0=mycall
hiscall0=hiscall
endif
@ -128,7 +130,8 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
nrxrpt=iand(imsg,15)
nrxhash=(imsg-nrxrpt)/16
!write(*,*) 'decodeframe ',nhammd,cord,nrxhash,nrxrpt,nhashes(nrxrpt)
if(nhammd.le.5 .and. cord .lt. 1.7 .and. nrxhash.eq.nhashes(nrxrpt)) then
! if(nhammd.le.5 .and. cord .lt. 1.7 .and. nrxhash.eq.nhashes(nrxrpt)) then
if(nhammd.le.5 .and. cord .lt. 1.7 .and. nrxhash.eq.ihash) then
nsuccess=1
write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(mycall), &
trim(hiscall),">",rpt(nrxrpt)