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