mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-31 23:57:10 -04:00
First good decode in submode QRA64D.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6961 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
63cd71005e
commit
e039c6d53f
@ -99,9 +99,9 @@ contains
|
||||
|
||||
if(nsubmode.ge.100) then
|
||||
! This is QRA64 mode
|
||||
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 ###
|
||||
mode64=2**(nsubmode-100)
|
||||
call qra64a(dd,nutc,nf1,nf2,nfqso,ntol,mode64,mycall,hiscall, &
|
||||
hisgrid,sync,nsnr,dtx,nfreq,decoded,nft)
|
||||
if (associated(this%callback)) then
|
||||
ndrift=0
|
||||
nflip=1
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine qra64a(dd,nutc,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12, &
|
||||
subroutine qra64a(dd,nutc,nf1,nf2,nfqso,ntol,mode64,mycall_12,hiscall_12, &
|
||||
hisgrid_6,sync,nsnr,dtx,nfreq,decoded,nft)
|
||||
|
||||
use packjt
|
||||
@ -38,7 +38,7 @@ subroutine qra64a(dd,nutc,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12, &
|
||||
endif
|
||||
|
||||
maxf1=5
|
||||
call sync64(dd,nf1,nf2,nfqso,ntol,maxf1,dtx,f0,jpk,kpk,snr1,c00)
|
||||
call sync64(dd,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk,snr1,c00)
|
||||
|
||||
npts2=216000
|
||||
naptype=4
|
||||
@ -53,7 +53,7 @@ subroutine qra64a(dd,nutc,nf1,nf2,nfqso,ntol,mycall_12,hiscall_12, &
|
||||
if(mod(itry1,2).eq.0) idf1=-idf1
|
||||
a(2)=-0.67*(idf1 + 0.67*kpk)
|
||||
call twkfreq(c00,c0,npts2,4000.0,a)
|
||||
call spec64(c0,npts2,jpk,s3)
|
||||
call spec64(c0,npts2,mode64,jpk,s3)
|
||||
call qra64_dec(s3,nc1,nc2,ng2,naptype,0,dat4,snr2,irc)
|
||||
decoded=' '
|
||||
if(irc.ge.0) then
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine spec64(c0,npts2,jpk,s3a)
|
||||
subroutine spec64(c0,npts2,mode64,jpk,s3a)
|
||||
|
||||
parameter (NSPS=2304) !Samples per symbol at 4000 Hz
|
||||
complex c0(0:360000) !Complex spectrum of dd()
|
||||
@ -8,15 +8,17 @@ subroutine spec64(c0,npts2,jpk,s3a)
|
||||
nfft4=221184
|
||||
c0(npts2:)=0.
|
||||
call four2a(c0,nfft4,1,-1,1) !Forward c2c
|
||||
! nsubmode=1
|
||||
! ndown=16/nsubmode
|
||||
ndown=16
|
||||
ndown=16/mode64
|
||||
nfft5=nfft4/ndown
|
||||
npts3=npts2/ndown
|
||||
call four2a(c0,nfft5,1,1,1) !Inverse c2c, downsampled
|
||||
|
||||
nfft6=nsps/ndown
|
||||
fsample=4000.0/ndown
|
||||
df=fsample/nfft6
|
||||
jpkd=nint(float(jpk)/ndown)
|
||||
! write(*,3001) mode64,ndown,nfft6,fsample,df
|
||||
!3001 format(i2,i3,i7,f7.1,f8.3)
|
||||
do j=1,63
|
||||
jj=j+7 !Skip first Costas array
|
||||
if(j.ge.32) jj=j+14 !Skip middle Costas array
|
||||
@ -24,8 +26,19 @@ subroutine spec64(c0,npts2,jpk,s3a)
|
||||
jb=ja+nfft6-1
|
||||
cs(0:nfft6-1)=1.3e-8*c0(ja:jb)
|
||||
call four2a(cs,nfft6,1,-1,1)
|
||||
do i=0,63
|
||||
s3a(i,j)=real(cs(i))**2 + aimag(cs(i))**2
|
||||
ia=-mode64/2 - mode64
|
||||
do ii=0,63
|
||||
ia=ia+mode64
|
||||
ib=ia+mode64-1
|
||||
s=0.
|
||||
do i=ia,ib
|
||||
if(i.ge.0) then
|
||||
s=s + real(cs(i))**2 + aimag(cs(i))**2
|
||||
else
|
||||
s=s + real(cs(nfft6+i))**2 + aimag(cs(nfft6+i))**2
|
||||
endif
|
||||
enddo
|
||||
s3a(ii,j)=s/mode64
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
subroutine sync64(dd,nf1,nf2,nfqso,ntol,maxf1,dtx,f0,jpk,kpk,snrdb,c0)
|
||||
subroutine sync64(dd,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk,snrdb,c0)
|
||||
|
||||
parameter (NMAX=60*12000) !Max size of raw data at 12000 Hz
|
||||
parameter (NSPS=2304) !Samples per symbol at 4000 Hz
|
||||
@ -9,6 +9,7 @@ subroutine sync64(dd,nf1,nf2,nfqso,ntol,maxf1,dtx,f0,jpk,kpk,snrdb,c0)
|
||||
real s3(0:NSPC-1) !Power spectrum of Costas 3
|
||||
real s0(0:NSPC-1) !Sum of s1+s2+s3
|
||||
real s0a(0:NSPC-1) !Best synchromized spectrum
|
||||
real a(5)
|
||||
integer icos7(0:6) !Costas 7x7 tones
|
||||
integer ipk0(1)
|
||||
complex cc(0:NSPC-1) !Costas waveform
|
||||
@ -16,14 +17,13 @@ subroutine sync64(dd,nf1,nf2,nfqso,ntol,maxf1,dtx,f0,jpk,kpk,snrdb,c0)
|
||||
complex c1(0:NSPC-1) !Complex spectrum of Costas 1
|
||||
complex c2(0:NSPC-1) !Complex spectrum of Costas 2
|
||||
complex c3(0:NSPC-1) !Complex spectrum of Costas 3
|
||||
logical first
|
||||
data icos7/2,5,6,0,4,1,3/ !Costas 7x7 tone pattern
|
||||
data first/.true./
|
||||
data mode64z/-1/
|
||||
save
|
||||
|
||||
if(first) then
|
||||
if(mode64.ne.mode64z) then
|
||||
twopi=8.0*atan(1.0)
|
||||
dfgen=12000.0/6912.0
|
||||
dfgen=mode64*12000.0/6912.0
|
||||
k=-1
|
||||
phi=0.
|
||||
do j=0,6 !Compute complex Costas waveform
|
||||
@ -35,7 +35,7 @@ subroutine sync64(dd,nf1,nf2,nfqso,ntol,maxf1,dtx,f0,jpk,kpk,snrdb,c0)
|
||||
cc(k)=cmplx(cos(phi),sin(phi))
|
||||
enddo
|
||||
enddo
|
||||
first=.false.
|
||||
mode64z=mode64
|
||||
endif
|
||||
|
||||
npts0=54*12000
|
||||
@ -43,7 +43,7 @@ subroutine sync64(dd,nf1,nf2,nfqso,ntol,maxf1,dtx,f0,jpk,kpk,snrdb,c0)
|
||||
nfft2=nfft1/3
|
||||
df1=12000.0/nfft1
|
||||
fac=2.0/nfft1
|
||||
do i=0,nfft1/2
|
||||
do i=0,nfft1/2 !Load real data into c0
|
||||
c0(i)=fac*cmplx(dd(1+2*i),dd(2+2*i))
|
||||
enddo
|
||||
call four2a(c0,nfft1,1,-1,0) !Forward r2c FFT
|
||||
@ -88,12 +88,15 @@ subroutine sync64(dd,nf1,nf2,nfqso,ntol,maxf1,dtx,f0,jpk,kpk,snrdb,c0)
|
||||
enddo
|
||||
do k=ka,kb
|
||||
s0(ia:ib)=s1(ia-k:ib-k) + s2(ia:ib) + s3(ia+k:ib+k)
|
||||
call smo121(s0(ia:ib),iz)
|
||||
!###
|
||||
do nn=1,mode64
|
||||
call smo121(s0(ia:ib),iz)
|
||||
enddo
|
||||
!###
|
||||
call averms(s0(ia:ib),iz,14,ave,rms)
|
||||
s=(maxval(s0(ia:ib))-ave)/rms
|
||||
if(s.gt.snr) then
|
||||
jpk=j1
|
||||
! s0a=(s0-ave)/rms
|
||||
s0a=s0/rms
|
||||
snr=s
|
||||
dtx=jpk/4000.0 - 1.0
|
||||
|
@ -2133,7 +2133,7 @@ void MainWindow::decode() //decode()
|
||||
}
|
||||
dec_data.params.ntrperiod=m_TRperiod;
|
||||
dec_data.params.nsubmode=m_nSubMode;
|
||||
if(m_mode=="QRA64") dec_data.params.nsubmode=101;
|
||||
if(m_mode=="QRA64") dec_data.params.nsubmode=100 + m_nSubMode;
|
||||
dec_data.params.minw=0;
|
||||
dec_data.params.nclearave=m_nclearave;
|
||||
if(m_nclearave!=0) {
|
||||
|
Loading…
Reference in New Issue
Block a user