mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 08:31:57 -05: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
49b7ac8937
commit
fde606a912
@ -80,7 +80,7 @@ subroutine hspec(id2,k,nutc0,ntrpdepth,nrxfreq,ntol,bmsk144,ingain, &
|
|||||||
tt1=sum(float(abs(id2(k0:k0+3583))))
|
tt1=sum(float(abs(id2(k0:k0+3583))))
|
||||||
k0=k-3584
|
k0=k-3584
|
||||||
tt2=sum(float(abs(id2(k0:k0+3583))))
|
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, &
|
call mskrtd(id2(k-7168+1:k),nutc0,tsec,ntol,nrxfreq,ndepth, &
|
||||||
mycall,hiscall,bshmsg,line1)
|
mycall,hiscall,bshmsg,line1)
|
||||||
endif
|
endif
|
||||||
|
@ -11,7 +11,6 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
|
|||||||
integer*1 cw(32)
|
integer*1 cw(32)
|
||||||
integer*1 decoded(16)
|
integer*1 decoded(16)
|
||||||
integer s8r(8),hardbits(40)
|
integer s8r(8),hardbits(40)
|
||||||
! integer nhashes(0:15)
|
|
||||||
real*8 dt, fs, pi, twopi
|
real*8 dt, fs, pi, twopi
|
||||||
real cbi(42),cbq(42)
|
real cbi(42),cbq(42)
|
||||||
real pp(12)
|
real pp(12)
|
||||||
@ -53,14 +52,10 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if(mycall.ne.mycall0 .or. hiscall.ne.hiscall0) then
|
if(mycall.ne.mycall0 .or. hiscall.ne.hiscall0) then
|
||||||
! do i=0,15
|
hashmsg=trim(mycall)//' '//trim(hiscall)
|
||||||
! hashmsg=trim(mycall)//' '//trim(hiscall)//' '//rpt(i)
|
call fmtmsg(hashmsg,iz)
|
||||||
hashmsg=trim(mycall)//' '//trim(hiscall)
|
call hash(hashmsg,22,ihash)
|
||||||
call fmtmsg(hashmsg,iz)
|
ihash=iand(ihash,4095)
|
||||||
call hash(hashmsg,22,ihash)
|
|
||||||
ihash=iand(ihash,4095)
|
|
||||||
! nhashes(i)=iand(ihash,4095)
|
|
||||||
! enddo
|
|
||||||
mycall0=mycall
|
mycall0=mycall
|
||||||
hiscall0=hiscall
|
hiscall0=hiscall
|
||||||
endif
|
endif
|
||||||
@ -76,7 +71,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
|
|||||||
cfac=cmplx(cos(phase0),sin(phase0))
|
cfac=cmplx(cos(phase0),sin(phase0))
|
||||||
c=c*conjg(cfac)
|
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(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)
|
softbits(2)=sum(real(c(1:12))*pp)
|
||||||
do i=2,20
|
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)
|
softbits(2*i)=sum(real(c(7+(i-1)*12-6:7+(i-1)*12+5))*pp)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
! sync word hard error weight is used as a discriminator for
|
! Sync word hard error weight is used to reject frames that
|
||||||
! frames that have reasonable probability of decoding
|
! are unlikely to decode.
|
||||||
hardbits=0
|
hardbits=0
|
||||||
do i=1,40
|
do i=1,40
|
||||||
if( softbits(i) .ge. 0.0 ) then
|
if( softbits(i) .ge. 0.0 ) then
|
||||||
@ -98,7 +93,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
! normalize the softsymbols before submitting to decoder
|
! Normalize the softsymbols before submitting to decoder.
|
||||||
sav=sum(softbits)/40
|
sav=sum(softbits)/40
|
||||||
s2av=sum(softbits*softbits)/40
|
s2av=sum(softbits*softbits)/40
|
||||||
ssig=sqrt(s2av-sav*sav)
|
ssig=sqrt(s2av-sav*sav)
|
||||||
@ -129,8 +124,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,msgreceived,nsuccess)
|
|||||||
enddo
|
enddo
|
||||||
nrxrpt=iand(imsg,15)
|
nrxrpt=iand(imsg,15)
|
||||||
nrxhash=(imsg-nrxrpt)/16
|
nrxhash=(imsg-nrxrpt)/16
|
||||||
!write(*,*) 'decodeframe ',nhammd,cord,nrxhash,nrxrpt,ihash
|
!write(*,*) 'decodeframe ',nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma
|
||||||
! 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
|
if(nhammd.le.5 .and. cord .lt. 1.7 .and. nrxhash.eq.ihash) then
|
||||||
nsuccess=1
|
nsuccess=1
|
||||||
write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(mycall), &
|
write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(mycall), &
|
||||||
|
Loading…
Reference in New Issue
Block a user