mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-05 00:41:19 -05:00
84b38ee0ad
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8317 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
37 lines
835 B
Fortran
37 lines
835 B
Fortran
subroutine foxfilt(nslots,width,wave)
|
|
|
|
parameter (NN=79,ND=58,KK=87,NSPS=4*1920)
|
|
parameter (NWAVE=NN*NSPS,NFFT=614400,NH=NFFT/2)
|
|
real wave(NWAVE)
|
|
real x(NFFT)
|
|
complex cx(0:NH)
|
|
equivalence (x,cx)
|
|
|
|
x(1:NWAVE)=wave
|
|
x(NWAVE+1:)=0.
|
|
call four2a(x,NFFT,1,-1,0) !r2c
|
|
df=48000.0/NFFT
|
|
fa=1800.0 - 0.5*6.25
|
|
fb=1800.0 + 7.5*6.25 + (nslots-1)*60.0
|
|
ia2=nint(fa/df)
|
|
ib1=nint(fb/df)
|
|
ia1=nint(ia2-width/df)
|
|
ib2=nint(ib1+width/df)
|
|
pi=4.0*atan(1.0)
|
|
do i=ia1,ia2
|
|
fil=(1.0 + cos(pi*df*(i-ia2)/width))/2.0
|
|
cx(i)=fil*cx(i)
|
|
enddo
|
|
do i=ib1,ib2
|
|
fil=(1.0 + cos(pi*df*(i-ib1)/width))/2.0
|
|
cx(i)=fil*cx(i)
|
|
enddo
|
|
cx(0:ia1-1)=0.
|
|
cx(ib2+1:)=0.
|
|
|
|
call four2a(cx,nfft,1,1,-1) !c2r
|
|
wave=x(1:NWAVE)/nfft
|
|
|
|
return
|
|
end subroutine foxfilt
|