mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-31 23:57:10 -04:00
Fix typo in hspec. Minor tweaks to comments in msk40decodeframe.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7204 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
e60bab8a3d
commit
85ba893e07
@ -80,7 +80,7 @@ subroutine hspec(id2,k,nutc0,ntrpdepth,nrxfreq,ntol,bmsk144,ingain, &
|
||||
tt1=sum(float(abs(id2(k0:k0+3583))))
|
||||
k0=k-3584
|
||||
tt2=sum(float(abs(id2(k0:k0+3583))))
|
||||
if(tt.ne.0.0 .and. tt2.ne.0) then
|
||||
if(tt1.ne.0.0 .and. tt2.ne.0) then
|
||||
call mskrtd(id2(k-7168+1:k),nutc0,tsec,ntol,nrxfreq,ndepth, &
|
||||
mycall,hiscall,bshmsg,line1)
|
||||
endif
|
||||
|
@ -11,7 +11,6 @@ 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)
|
||||
real*8 dt, fs, pi, twopi
|
||||
real cbi(42),cbq(42)
|
||||
real pp(12)
|
||||
@ -53,14 +52,10 @@ 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)
|
||||
hashmsg=trim(mycall)//' '//trim(hiscall)
|
||||
call fmtmsg(hashmsg,iz)
|
||||
call hash(hashmsg,22,ihash)
|
||||
ihash=iand(ihash,4095)
|
||||
! nhashes(i)=iand(ihash,4095)
|
||||
! enddo
|
||||
hashmsg=trim(mycall)//' '//trim(hiscall)
|
||||
call fmtmsg(hashmsg,iz)
|
||||
call hash(hashmsg,22,ihash)
|
||||
ihash=iand(ihash,4095)
|
||||
mycall0=mycall
|
||||
hiscall0=hiscall
|
||||
endif
|
||||
@ -76,7 +71,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
|
||||
cfac=cmplx(cos(phase0),sin(phase0))
|
||||
c=c*conjg(cfac)
|
||||
|
||||
! matched filter -
|
||||
! Matched filter.
|
||||
softbits(1)=sum(imag(c(1:6))*pp(7:12))+sum(imag(c(NSPM-5:NSPM))*pp(1:6))
|
||||
softbits(2)=sum(real(c(1:12))*pp)
|
||||
do i=2,20
|
||||
@ -84,8 +79,8 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
|
||||
softbits(2*i)=sum(real(c(7+(i-1)*12-6:7+(i-1)*12+5))*pp)
|
||||
enddo
|
||||
|
||||
! sync word hard error weight is used as a discriminator for
|
||||
! frames that have reasonable probability of decoding
|
||||
! Sync word hard error weight is used to reject frames that
|
||||
! are unlikely to decode.
|
||||
hardbits=0
|
||||
do i=1,40
|
||||
if( softbits(i) .ge. 0.0 ) then
|
||||
@ -98,7 +93,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
|
||||
return
|
||||
endif
|
||||
|
||||
! normalize the softsymbols before submitting to decoder
|
||||
! Normalize the softsymbols before submitting to decoder.
|
||||
sav=sum(softbits)/40
|
||||
s2av=sum(softbits*softbits)/40
|
||||
ssig=sqrt(s2av-sav*sav)
|
||||
@ -129,8 +124,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
|
||||
enddo
|
||||
nrxrpt=iand(imsg,15)
|
||||
nrxhash=(imsg-nrxrpt)/16
|
||||
!write(*,*) 'decodeframe ',nhammd,cord,nrxhash,nrxrpt,ihash
|
||||
! if(nhammd.le.5 .and. cord .lt. 1.7 .and. nrxhash.eq.nhashes(nrxrpt)) then
|
||||
!write(*,*) 'decodeframe ',nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma
|
||||
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), &
|
||||
|
Loading…
Reference in New Issue
Block a user