mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-04-13 23:08:34 -04:00
Remove some xpol stuff from filbig and q65b.
This commit is contained in:
parent
994e9ca929
commit
fed64b6d9f
@ -7,7 +7,7 @@ subroutine filbig(dd,nmax,f0,newdat,nfsample,xpol,c4a,c4b,n4)
|
||||
parameter (MAXFFT1=5376000,MAXFFT2=77175)
|
||||
real*4 dd(4,nmax) !Input data
|
||||
complex ca(MAXFFT1),cb(MAXFFT1) !FFTs of input
|
||||
complex c4a(MAXFFT2),c4b(MAXFFT2) !Output data
|
||||
complex c4a(MAXFFT2) !Output data
|
||||
real*8 df
|
||||
real halfpulse(8) !Impulse response of filter (one sided)
|
||||
complex cfilt(MAXFFT2) !Filter (complex; imag = 0)
|
||||
@ -15,7 +15,7 @@ subroutine filbig(dd,nmax,f0,newdat,nfsample,xpol,c4a,c4b,n4)
|
||||
integer*8 plan1,plan2,plan3,plan4,plan5
|
||||
logical first,xpol
|
||||
include 'fftw3.f'
|
||||
common/cacb/ca,cb
|
||||
common/cacb/ca
|
||||
equivalence (rfilt,cfilt)
|
||||
data first/.true./,npatience/1/
|
||||
data halfpulse/114.97547150,36.57879257,-20.93789101, &
|
||||
@ -76,18 +76,15 @@ subroutine filbig(dd,nmax,f0,newdat,nfsample,xpol,c4a,c4b,n4)
|
||||
nz=min(nmax,nfft1)
|
||||
do i=1,nz
|
||||
ca(i)=cmplx(dd(1,i),dd(2,i))
|
||||
if(xpol) cb(i)=cmplx(dd(3,i),dd(4,i))
|
||||
enddo
|
||||
|
||||
if(nmax.lt.nfft1) then
|
||||
do i=nmax+1,nfft1
|
||||
ca(i)=0.
|
||||
if(xpol) cb(i)=0.
|
||||
enddo
|
||||
endif
|
||||
call timer('FFTbig ',0)
|
||||
call sfftw_execute(plan1)
|
||||
if(xpol) call sfftw_execute(plan2)
|
||||
call timer('FFTbig ',1)
|
||||
newdat=0
|
||||
endif
|
||||
@ -101,23 +98,19 @@ subroutine filbig(dd,nmax,f0,newdat,nfsample,xpol,c4a,c4b,n4)
|
||||
j=i0+i-1 !and apply the filter function
|
||||
if(j.ge.1 .and. j.le.nfft1) then
|
||||
c4a(i)=rfilt(i)*ca(j)
|
||||
if(xpol) c4b(i)=rfilt(i)*cb(j)
|
||||
else
|
||||
c4a(i)=0.
|
||||
if(xpol) c4b(i)=0.
|
||||
endif
|
||||
enddo
|
||||
do i=nh+1,nfft2
|
||||
j=i0+i-1-nfft2
|
||||
if(j.lt.1) j=j+nfft1 !nfft1 was nfft2
|
||||
c4a(i)=rfilt(i)*ca(j)
|
||||
if(xpol) c4b(i)=rfilt(i)*cb(j)
|
||||
enddo
|
||||
|
||||
! Do the short reverse transform, to go back to time domain.
|
||||
call timer('FFTsmall',0)
|
||||
call sfftw_execute(plan3)
|
||||
if(xpol) call sfftw_execute(plan4)
|
||||
call timer('FFTsmall',1)
|
||||
n4=min(nmax/64,nfft2)
|
||||
go to 999
|
||||
|
@ -21,7 +21,7 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
|
||||
! type(hdr) h !Header for the .wav file
|
||||
integer*2 iwave(60*12000)
|
||||
complex ca(MAXFFT1),cb(MAXFFT1) !FFTs of raw x,y data
|
||||
complex cx(0:MAXFFT2-1),cy(0:MAXFFT2-1),cz(0:MAXFFT2)
|
||||
complex cx(0:MAXFFT2-1),cz(0:MAXFFT2)
|
||||
logical xpol,ldecoded
|
||||
integer ipk1(1)
|
||||
real*8 fcenter,freq0,freq1
|
||||
@ -35,7 +35,7 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
|
||||
character*1 cp,cmode*2
|
||||
character*60 result
|
||||
common/decodes/ndecodes,ncand,result(50)
|
||||
common/cacb/ca,cb
|
||||
common/cacb/ca
|
||||
common/early/nhsym1,nhsym2,ldecoded(32768)
|
||||
data nutc00/-1/,msg00/' '/
|
||||
save
|
||||
@ -59,7 +59,6 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
|
||||
if(ldecoded(ipk)) go to 900
|
||||
snr1=sync(ipk)%ccfmax
|
||||
ipol=1
|
||||
if(xpol) ipol=sync(ipk)%ipol
|
||||
|
||||
nfft1=MAXFFT1
|
||||
nfft2=MAXFFT2
|
||||
@ -81,12 +80,8 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
|
||||
fac=1.0/nfft2
|
||||
cx(0:nfft2-1)=ca(k0:k0+nfft2-1)
|
||||
cx=fac*cx
|
||||
if(xpol) then
|
||||
cy(0:nfft2-1)=cb(k0:k0+nfft2-1)
|
||||
cy=fac*cy
|
||||
endif
|
||||
|
||||
! Here cx and cy (if xpol) are frequency-domain data around the selected
|
||||
! Here cx is frequency-domain data around the selected
|
||||
! QSO frequency, taken from the full-length FFT computed in filbig().
|
||||
! Values for fsample, nfft1, nfft2, df, and the downsampled data rate
|
||||
! are as follows:
|
||||
@ -98,12 +93,7 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
|
||||
! 95238 5120000 0.018601172 322560 5999.994
|
||||
|
||||
poldeg=0.
|
||||
if(xpol) then
|
||||
poldeg=sync(ipk)%pol
|
||||
cz(0:MAXFFT2-1)=cos(poldeg/RAD)*cx + sin(poldeg/RAD)*cy
|
||||
else
|
||||
cz(0:MAXFFT2-1)=cx
|
||||
endif
|
||||
cz(0:MAXFFT2-1)=cx
|
||||
|
||||
cz(MAXFFT2)=0.
|
||||
! Roll off below 500 Hz and above 2500 Hz.
|
||||
@ -151,20 +141,14 @@ subroutine q65b(nutc,nqd,nxant,fcenter,nfcal,nfsample,ikhz,mousedf,ntol,xpol, &
|
||||
nq65df=nint(1000*(0.001*k0*df+nkhz_center-48.0+1.000-1.27046-ikhz))-nfcal
|
||||
nq65df=nq65df + nfreq0 - 1000
|
||||
npol=nint(poldeg)
|
||||
if(nxant.ne.0) then
|
||||
npol=npol-45
|
||||
if(npol.lt.0) npol=npol+180
|
||||
endif
|
||||
call txpol(xpol,msg0(1:22),mygrid,npol,nxant,ntxpol,cp)
|
||||
ikhz1=ikhz
|
||||
ndf=nq65df
|
||||
if(ndf.gt.500) ikhz1=ikhz + (nq65df+500)/1000
|
||||
if(ndf.lt.-500) ikhz1=ikhz + (nq65df-500)/1000
|
||||
ndf=nq65df - 1000*(ikhz1-ikhz)
|
||||
if(nqd.eq.1 .and. abs(nq65df-mousedf).lt.ntol) then
|
||||
write(line,1020) ikhz1,ndf,npol,nutc,xdt0,nsnr0,msg0(1:27),cq0, &
|
||||
ntxpol,cp
|
||||
1020 format('!',i3.3,i5,i4,i6.4,f5.1,i5,' : ',a27,a3,i4,1x,a1)
|
||||
write(line,1020) ikhz1,ndf,npol,nutc,xdt0,nsnr0,msg0(1:27),cq0
|
||||
1020 format('!',i3.3,i5,i4,i6.4,f5.1,i5,' : ',a27,a3)
|
||||
write(*,1100) trim(line)
|
||||
1100 format(a)
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user