mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-23 20:48:33 -04:00
Cleanup and minor tweaks to QRA64 decoding scheme.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6931 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
2df82d2b12
commit
76ed1007c4
lib
@ -99,8 +99,8 @@ contains
|
||||
|
||||
if(nsubmode.ge.100) then
|
||||
! This is QRA64 mode
|
||||
call qra64a(dd,nf1,nf2,nfqso,ntol,mycall,hiscall,hisgrid,sync,nsnr, &
|
||||
dtx,nfreq,decoded,nft)
|
||||
call qra64a(dd,nutc,nf1,nf2,nfqso,ntol,mycall,hiscall,hisgrid, &
|
||||
sync,nsnr,dtx,nfreq,decoded,nft)
|
||||
! if(sync.lt.12.8) go to 900 !### Temporary ###
|
||||
if (associated(this%callback)) then
|
||||
ndrift=0
|
||||
|
@ -70,13 +70,13 @@ program qra64sim
|
||||
if(mod(nsigs,2).eq.0) f0=1500.0 + dfsig*(isig-0.5-nsigs/2)
|
||||
if(mod(nsigs,2).eq.1) f0=1500.0 + dfsig*(isig-(nsigs+1)/2)
|
||||
xsnr=snrdb
|
||||
if(snrdb.eq.0.0) xsnr=-19 - isig
|
||||
if(snrdb.eq.0.0) xsnr=-20 - isig
|
||||
|
||||
call genqra64(msg,ichk,msgsent,itone,itype)
|
||||
|
||||
! bandwidth_ratio=2500.0/6000.0
|
||||
! sig=sqrt(2*bandwidth_ratio)*10.0**(0.05*xsnr)
|
||||
sig=sqrt(2.0)*10.0**(0.05*xsnr)
|
||||
bandwidth_ratio=2500.0/6000.0
|
||||
sig=sqrt(2*bandwidth_ratio)*10.0**(0.05*xsnr)
|
||||
! sig=sqrt(2.0)*10.0**(0.05*xsnr)
|
||||
if(xsnr.gt.90.0) sig=1.0
|
||||
write(*,1020) ifile,isig,f0,csubmode,xsnr,xdt,fspread,msg
|
||||
1020 format(i4,i4,f10.3,2x,a1,2x,f5.1,f6.2,f5.1,1x,a22)
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12,hisgrid_6, &
|
||||
subroutine qra64a(dd,nutc,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12,hisgrid_6, &
|
||||
sync,nsnr,dtx,nfreq,decoded,nft)
|
||||
|
||||
use packjt
|
||||
@ -10,13 +10,10 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12,hisgrid_6, &
|
||||
logical ltext
|
||||
integer*8 count0,count1,clkfreq
|
||||
integer icos7(0:6)
|
||||
integer ipk(1)
|
||||
integer jpk(1)
|
||||
integer dat4(12)
|
||||
real dd(60*12000)
|
||||
real s(NZ)
|
||||
real savg(NZ)
|
||||
real blue(0:25)
|
||||
real red(NZ)
|
||||
real x(NFFT)
|
||||
complex cx(0:NH)
|
||||
@ -85,29 +82,8 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12,hisgrid_6, &
|
||||
|
||||
if0=nint(f0/df)
|
||||
nfreq=nint(f0)
|
||||
blue(0:25)=ccf(if0,0:25)
|
||||
jpk=maxloc(blue)
|
||||
xpk=jpk(1) + 1.0
|
||||
call slope(blue,26,xpk)
|
||||
|
||||
! Insist on at least 10 correct hard decisions in the 21 Costas bins.
|
||||
nhard=0
|
||||
do n=0,6
|
||||
ipk=maxloc(ss(i0:i0+63,1+j0+2*n)) - 1
|
||||
i=abs(ipk(1)-2*icos7(n))
|
||||
if(i.le.1) nhard=nhard+1
|
||||
|
||||
ipk=maxloc(ss(i0:i0+63,1+j0+2*n+78)) - 1
|
||||
i=abs(ipk(1)-2*icos7(n))
|
||||
if(i.le.1) nhard=nhard+1
|
||||
|
||||
ipk=maxloc(ss(i0:i0+63,1+j0+2*n+154)) - 1
|
||||
i=abs(ipk(1)-2*icos7(n))
|
||||
if(i.le.1) nhard=nhard+1
|
||||
enddo
|
||||
if(nhard.lt.5) go to 900
|
||||
|
||||
do i=0,63
|
||||
do i=0,63 !Copy symbol spectra into s3()
|
||||
k=i0 + 2*i
|
||||
jj=j0+13
|
||||
do j=1,63
|
||||
@ -117,7 +93,7 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12,hisgrid_6, &
|
||||
enddo
|
||||
enddo
|
||||
|
||||
if(sync.gt.1.0) snr1=10.0*log10(sync) - 38.0
|
||||
if(sync.gt.1.0) snr1=10.0*log10(sync) - 39.0
|
||||
nsnr=nint(snr1)
|
||||
|
||||
mycall=mycall_12(1:6) !### May need fixing ###
|
||||
@ -130,10 +106,10 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12,hisgrid_6, &
|
||||
nmycall=ncq
|
||||
|
||||
snr2=-99.
|
||||
ttot=0.
|
||||
do naptype=4,0,-1
|
||||
naptype=4
|
||||
do iter=1,2
|
||||
call system_clock(count0,clkfreq)
|
||||
if(naptype.eq.0) nmycall=ncq
|
||||
if(iter.eq.2) nmycall=ncq
|
||||
call qra64_dec(s3,nmycall,nhiscall,nhisgrid,naptype,dat4,snr2,irc)
|
||||
if(irc.ge.0) then
|
||||
call unpackmsg(dat4,decoded) !Unpack the user message
|
||||
@ -145,12 +121,10 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12,hisgrid_6, &
|
||||
endif
|
||||
call system_clock(count1,clkfreq)
|
||||
tsec=float(count1-count0)/float(clkfreq)
|
||||
ttot=ttot+tsec
|
||||
write(78,3900) sync,snr1,snr2,snr2-snr1,dtx,nfreq,nhard,naptype,irc, &
|
||||
tsec,ttot,decoded
|
||||
3900 format(4f6.1,f6.2,i5,i3,i2,i3,2f6.3,1x,a22)
|
||||
write(78,3900) nutc,sync,snr1,snr2,dtx,nfreq,iter,irc,tsec,decoded
|
||||
3900 format(i4.4,3f6.1,f6.2,i5,i2,i3,f6.3,1x,a22)
|
||||
if(irc.ge.0) exit
|
||||
enddo
|
||||
|
||||
900 return
|
||||
return
|
||||
end subroutine qra64a
|
||||
|
Loading…
Reference in New Issue
Block a user