mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05:00
Change to 4-bit messages.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6995 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
dc7826d5ea
commit
0f80024ec9
@ -3,7 +3,7 @@ subroutine detectmsk40(cbig,n,pchk_file,mycall,hiscall,lines,nmessages, &
|
||||
|
||||
use timer_module, only: timer
|
||||
parameter (NSPM=240, NPTS=3*NSPM, MAXSTEPS=7500, NFFT=3*NSPM, MAXCAND=15)
|
||||
character*4 rpt(0:63)
|
||||
character*4 rpt(0:15)
|
||||
character*6 mycall,hiscall,mycall0,hiscall0
|
||||
character*22 hashmsg,msgreceived
|
||||
character*80 lines(100)
|
||||
@ -23,7 +23,7 @@ subroutine detectmsk40(cbig,n,pchk_file,mycall,hiscall,lines,nmessages, &
|
||||
complex bb(6)
|
||||
integer s8(8),s8r(8),hardbits(40)
|
||||
integer, dimension(1) :: iloc
|
||||
integer nhashes(0:63)
|
||||
integer nhashes(0:15)
|
||||
integer indices(MAXSTEPS)
|
||||
integer ipeaks(10)
|
||||
integer*1 cw(32)
|
||||
@ -46,6 +46,9 @@ subroutine detectmsk40(cbig,n,pchk_file,mycall,hiscall,lines,nmessages, &
|
||||
logical first
|
||||
data first/.true./
|
||||
data mycall0/'dummy'/,hiscall0/'dummy'/
|
||||
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 "/
|
||||
data s8/0,1,1,1,0,0,1,0/
|
||||
data s8r/1,0,1,1,0,0,0,1/
|
||||
! codeword for the message <K9AN K1JT> RRR
|
||||
@ -89,26 +92,15 @@ subroutine detectmsk40(cbig,n,pchk_file,mycall,hiscall,lines,nmessages, &
|
||||
cbi(37:42)=pp(1:6)*s8r(8)
|
||||
cbr=cmplx(cbi,cbq)
|
||||
|
||||
do i=0,30
|
||||
if( i.lt.5 ) then
|
||||
write(rpt(i),'(a1,i2.2,a1)') '-',abs(i-5)
|
||||
write(rpt(i+31),'(a2,i2.2,a1)') 'R-',abs(i-5)
|
||||
else
|
||||
write(rpt(i),'(a1,i2.2,a1)') '+',i-5
|
||||
write(rpt(i+31),'(a2,i2.2,a1)') 'R+',i-5
|
||||
endif
|
||||
enddo
|
||||
rpt(62)='RRR '
|
||||
rpt(63)='73 '
|
||||
first=.false.
|
||||
first=.false.
|
||||
endif
|
||||
|
||||
if(mycall.ne.mycall0 .or. hiscall.ne.hiscall0) then
|
||||
do i=0,63
|
||||
do i=0,15
|
||||
hashmsg=trim(mycall)//' '//trim(hiscall)//' '//rpt(i)
|
||||
call fmtmsg(hashmsg,iz)
|
||||
call hash(hashmsg,22,ihash)
|
||||
nhashes(i)=iand(ihash,1023)
|
||||
nhashes(i)=iand(ihash,4095)
|
||||
enddo
|
||||
mycall0=mycall
|
||||
hiscall0=hiscall
|
||||
@ -390,8 +382,8 @@ subroutine detectmsk40(cbig,n,pchk_file,mycall,hiscall,lines,nmessages, &
|
||||
do i=1,16
|
||||
imsg=ishft(imsg,1)+iand(1,decoded(17-i))
|
||||
enddo
|
||||
nrxrpt=iand(imsg,63)
|
||||
nrxhash=(imsg-nrxrpt)/64
|
||||
nrxrpt=iand(imsg,15)
|
||||
nrxhash=(imsg-nrxrpt)/16
|
||||
if( nhammd .le. 5 .and. cord .lt. 1.7 .and. nrxhash .eq. nhashes(nrxrpt) ) 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
|
||||
|
@ -4,7 +4,7 @@ subroutine genmsk40(msg,msgsent,ichk,itone,itype,pchk_file,fname1,fname2)
|
||||
character*22 msg,msgsent,hashmsg
|
||||
character*32 cwstring
|
||||
character*2 cwstrbit
|
||||
character*4 crpt,rpt(0:63)
|
||||
character*4 crpt,rpt(0:15)
|
||||
character*512 pchk_file,gen_file
|
||||
character*512 pchk_file40,gen_file40
|
||||
character*120 fname1,fname2
|
||||
@ -15,23 +15,11 @@ subroutine genmsk40(msg,msgsent,ichk,itone,itype,pchk_file,fname1,fname2)
|
||||
integer*1 s8r(8)
|
||||
data s8r/1,0,1,1,0,0,0,1/
|
||||
data first/.true./
|
||||
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,rpt
|
||||
|
||||
if(first) then
|
||||
do i=0,30
|
||||
if( i.lt.5 ) then
|
||||
write(rpt(i),'(a1,i2.2,a1)') '-',abs(i-5)
|
||||
write(rpt(i+31),'(a2,i2.2,a1)') 'R-',abs(i-5)
|
||||
else
|
||||
write(rpt(i),'(a1,i2.2,a1)') '+',i-5
|
||||
write(rpt(i+31),'(a2,i2.2,a1)') 'R+',i-5
|
||||
endif
|
||||
enddo
|
||||
rpt(62)='RRR '
|
||||
rpt(63)='73 '
|
||||
first=.false.
|
||||
endif
|
||||
|
||||
! Temporarily hardwire filenames and init on every call
|
||||
i=index(pchk_file,"128-80")
|
||||
pchk_file40=pchk_file(1:i-1)//"32-16"//pchk_file(i+6:)
|
||||
@ -45,7 +33,7 @@ subroutine genmsk40(msg,msgsent,ichk,itone,itype,pchk_file,fname1,fname2)
|
||||
if(i1.lt.9) go to 900
|
||||
call fmtmsg(msg,iz)
|
||||
crpt=msg(i1+2:i1+5)
|
||||
do i=0,63
|
||||
do i=0,15
|
||||
if(crpt.eq.rpt(i)) go to 10
|
||||
enddo
|
||||
go to 900
|
||||
@ -54,8 +42,8 @@ subroutine genmsk40(msg,msgsent,ichk,itone,itype,pchk_file,fname1,fname2)
|
||||
if(ichk.lt.10000) then
|
||||
hashmsg=msg(2:i1-1)//' '//crpt
|
||||
call hash(hashmsg,22,ihash)
|
||||
ihash=iand(ihash,1023) !10-bit hash
|
||||
ig=64*ihash + irpt !6-bit report
|
||||
ihash=iand(ihash,4095) !10-bit hash
|
||||
ig=16*ihash + irpt !6-bit report
|
||||
else
|
||||
ig=ichk-10000
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user