mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Fix SNR calculation for B,C,D submodes.
This commit is contained in:
parent
cdbe425e56
commit
9d2bde7180
@ -52,7 +52,7 @@ subroutine get_fst4_bitmetrics(cd,nss,hmod,nmax,nhicoh,bitmetrics,s4,badsync)
|
||||
do itone=0,3
|
||||
cs(itone,k)=sum(csymb*conjg(c1(:,itone)))
|
||||
enddo
|
||||
s4(0:3,k)=abs(cs(0:3,k))
|
||||
s4(0:3,k)=abs(cs(0:3,k))**2
|
||||
enddo
|
||||
|
||||
! Sync quality check
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine get_fst4_bitmetrics2(cd,nss,hmod,nsizes,bitmetrics,s4hmod,badsync)
|
||||
subroutine get_fst4_bitmetrics2(cd,nss,hmod,nsizes,bitmetrics,s4snr,badsync)
|
||||
|
||||
include 'fst4_params.f90'
|
||||
complex cd(0:NN*nss-1)
|
||||
@ -15,7 +15,7 @@ subroutine get_fst4_bitmetrics2(cd,nss,hmod,nsizes,bitmetrics,s4hmod,badsync)
|
||||
logical badsync
|
||||
real bitmetrics(2*NN,4)
|
||||
real s2(0:65535)
|
||||
real s4(0:3,NN,4),s4hmod(0:3,NN)
|
||||
real s4(0:3,NN,4),s4snr(0:3,NN)
|
||||
data isyncword1/0,1,3,2,1,0,2,3/
|
||||
data isyncword2/2,3,1,0,3,2,0,1/
|
||||
data graymap/0,1,3,2/
|
||||
@ -121,11 +121,8 @@ subroutine get_fst4_bitmetrics2(cd,nss,hmod,nsizes,bitmetrics,s4hmod,badsync)
|
||||
call normalizebmet(bitmetrics(:,3),2*NN)
|
||||
call normalizebmet(bitmetrics(:,4),2*NN)
|
||||
|
||||
! Return the s4 array corresponding to N=1/hmod. Will be used for SNR calculation
|
||||
if(hmod.eq.1) s4hmod(:,:)=s4(:,:,1)
|
||||
if(hmod.eq.2) s4hmod(:,:)=s4(:,:,2)
|
||||
if(hmod.eq.4) s4hmod(:,:)=s4(:,:,3)
|
||||
if(hmod.eq.8) s4hmod(:,:)=s4(:,:,4)
|
||||
! Return the s4 array corresponding to N=1. Will be used for SNR calculation
|
||||
s4snr(:,:)=s4(:,:,1)
|
||||
return
|
||||
|
||||
end subroutine get_fst4_bitmetrics2
|
||||
|
@ -550,7 +550,7 @@ contains
|
||||
endif
|
||||
xsig=0
|
||||
do i=1,NN
|
||||
xsig=xsig+s4(itone(i),i)**2
|
||||
xsig=xsig+s4(itone(i),i)
|
||||
enddo
|
||||
arg=600.0*(xsig/base)-1.0
|
||||
if(arg.gt.0.0) then
|
||||
|
Loading…
Reference in New Issue
Block a user