mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-07 16:32:27 -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
50ed5ee4fa
commit
c78c232363
@ -99,8 +99,8 @@ contains
|
|||||||
|
|
||||||
if(nsubmode.ge.100) then
|
if(nsubmode.ge.100) then
|
||||||
! This is QRA64 mode
|
! This is QRA64 mode
|
||||||
call qra64a(dd,nf1,nf2,nfqso,ntol,mycall,hiscall,hisgrid,sync,nsnr, &
|
call qra64a(dd,nutc,nf1,nf2,nfqso,ntol,mycall,hiscall,hisgrid, &
|
||||||
dtx,nfreq,decoded,nft)
|
sync,nsnr,dtx,nfreq,decoded,nft)
|
||||||
! if(sync.lt.12.8) go to 900 !### Temporary ###
|
! if(sync.lt.12.8) go to 900 !### Temporary ###
|
||||||
if (associated(this%callback)) then
|
if (associated(this%callback)) then
|
||||||
ndrift=0
|
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.0) f0=1500.0 + dfsig*(isig-0.5-nsigs/2)
|
||||||
if(mod(nsigs,2).eq.1) f0=1500.0 + dfsig*(isig-(nsigs+1)/2)
|
if(mod(nsigs,2).eq.1) f0=1500.0 + dfsig*(isig-(nsigs+1)/2)
|
||||||
xsnr=snrdb
|
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)
|
call genqra64(msg,ichk,msgsent,itone,itype)
|
||||||
|
|
||||||
! bandwidth_ratio=2500.0/6000.0
|
bandwidth_ratio=2500.0/6000.0
|
||||||
! sig=sqrt(2*bandwidth_ratio)*10.0**(0.05*xsnr)
|
sig=sqrt(2*bandwidth_ratio)*10.0**(0.05*xsnr)
|
||||||
sig=sqrt(2.0)*10.0**(0.05*xsnr)
|
! sig=sqrt(2.0)*10.0**(0.05*xsnr)
|
||||||
if(xsnr.gt.90.0) sig=1.0
|
if(xsnr.gt.90.0) sig=1.0
|
||||||
write(*,1020) ifile,isig,f0,csubmode,xsnr,xdt,fspread,msg
|
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)
|
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)
|
sync,nsnr,dtx,nfreq,decoded,nft)
|
||||||
|
|
||||||
use packjt
|
use packjt
|
||||||
@ -10,13 +10,10 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12,hisgrid_6, &
|
|||||||
logical ltext
|
logical ltext
|
||||||
integer*8 count0,count1,clkfreq
|
integer*8 count0,count1,clkfreq
|
||||||
integer icos7(0:6)
|
integer icos7(0:6)
|
||||||
integer ipk(1)
|
|
||||||
integer jpk(1)
|
|
||||||
integer dat4(12)
|
integer dat4(12)
|
||||||
real dd(60*12000)
|
real dd(60*12000)
|
||||||
real s(NZ)
|
real s(NZ)
|
||||||
real savg(NZ)
|
real savg(NZ)
|
||||||
real blue(0:25)
|
|
||||||
real red(NZ)
|
real red(NZ)
|
||||||
real x(NFFT)
|
real x(NFFT)
|
||||||
complex cx(0:NH)
|
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)
|
if0=nint(f0/df)
|
||||||
nfreq=nint(f0)
|
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.
|
do i=0,63 !Copy symbol spectra into s3()
|
||||||
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
|
|
||||||
k=i0 + 2*i
|
k=i0 + 2*i
|
||||||
jj=j0+13
|
jj=j0+13
|
||||||
do j=1,63
|
do j=1,63
|
||||||
@ -117,7 +93,7 @@ subroutine qra64a(dd,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12,hisgrid_6, &
|
|||||||
enddo
|
enddo
|
||||||
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)
|
nsnr=nint(snr1)
|
||||||
|
|
||||||
mycall=mycall_12(1:6) !### May need fixing ###
|
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
|
nmycall=ncq
|
||||||
|
|
||||||
snr2=-99.
|
snr2=-99.
|
||||||
ttot=0.
|
naptype=4
|
||||||
do naptype=4,0,-1
|
do iter=1,2
|
||||||
call system_clock(count0,clkfreq)
|
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)
|
call qra64_dec(s3,nmycall,nhiscall,nhisgrid,naptype,dat4,snr2,irc)
|
||||||
if(irc.ge.0) then
|
if(irc.ge.0) then
|
||||||
call unpackmsg(dat4,decoded) !Unpack the user message
|
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
|
endif
|
||||||
call system_clock(count1,clkfreq)
|
call system_clock(count1,clkfreq)
|
||||||
tsec=float(count1-count0)/float(clkfreq)
|
tsec=float(count1-count0)/float(clkfreq)
|
||||||
ttot=ttot+tsec
|
write(78,3900) nutc,sync,snr1,snr2,dtx,nfreq,iter,irc,tsec,decoded
|
||||||
write(78,3900) sync,snr1,snr2,snr2-snr1,dtx,nfreq,nhard,naptype,irc, &
|
3900 format(i4.4,3f6.1,f6.2,i5,i2,i3,f6.3,1x,a22)
|
||||||
tsec,ttot,decoded
|
|
||||||
3900 format(4f6.1,f6.2,i5,i3,i2,i3,2f6.3,1x,a22)
|
|
||||||
if(irc.ge.0) exit
|
if(irc.ge.0) exit
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
900 return
|
return
|
||||||
end subroutine qra64a
|
end subroutine qra64a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user