mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-29 21:02:26 -04:00
Correct the FT8 downsample factor to be exactly 1/64.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7779 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
e1b2bdef06
commit
4bce86d61e
@ -13,7 +13,7 @@ subroutine ft8b(dd0,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
|
|||||||
integer*1 decoded(KK),apmask(3*ND),cw(3*ND)
|
integer*1 decoded(KK),apmask(3*ND),cw(3*ND)
|
||||||
integer itone(NN)
|
integer itone(NN)
|
||||||
integer icos7(0:6)
|
integer icos7(0:6)
|
||||||
complex cd0(NP2)
|
complex cd0(3125)
|
||||||
complex csync(0:6,32)
|
complex csync(0:6,32)
|
||||||
complex ctwk(32)
|
complex ctwk(32)
|
||||||
complex csymb(32)
|
complex csymb(32)
|
||||||
@ -193,30 +193,34 @@ subroutine ft8_downsample(dd,f0,c1)
|
|||||||
|
|
||||||
! Downconvert to complex data sampled at 187.5 Hz, 32 samples/symbol
|
! Downconvert to complex data sampled at 187.5 Hz, 32 samples/symbol
|
||||||
|
|
||||||
parameter (NMAX=15*12000,NFFT2=2812)
|
parameter (NMAX=15*12000)
|
||||||
|
parameter (NFFT1=200000,NFFT2=3125) !200000/64 = 3125
|
||||||
complex c1(0:NFFT2-1)
|
complex c1(0:NFFT2-1)
|
||||||
complex cx(0:NMAX/2)
|
complex cx(0:NFFT1/2)
|
||||||
real dd(NMAX),x(NMAX)
|
real dd(NMAX),x(NFFT1)
|
||||||
equivalence (x,cx)
|
equivalence (x,cx)
|
||||||
save x
|
save x
|
||||||
|
|
||||||
df=12000.0/NMAX
|
df=12000.0/NFFT1
|
||||||
x=dd
|
x(1:NMAX)=dd
|
||||||
call four2a(cx,NMAX,1,-1,0) !r2c FFT to freq domain
|
x(NMAX+1:NFFT1)=0. !Zero-pad the x array
|
||||||
baud=12000.0/(32.0*64.0)
|
call four2a(cx,NFFT1,1,-1,0) !r2c FFT to freq domain
|
||||||
|
baud=12000.0/2048.0
|
||||||
i0=nint(f0/df)
|
i0=nint(f0/df)
|
||||||
ft=f0+8.0*baud
|
ft=f0+8.0*baud
|
||||||
it=min(nint(ft/df),NMAX/2-1)
|
it=min(nint(ft/df),NFFT1/2)
|
||||||
fb=f0-1.0*baud
|
fb=f0-1.0*baud
|
||||||
ib=max(1,nint(fb/df))
|
ib=max(1,nint(fb/df))
|
||||||
k=0
|
k=0
|
||||||
c1=cmplx(0.0,0.0)
|
c1=0.
|
||||||
do i=ib,it
|
do i=ib,it
|
||||||
c1(k)=cx(i)
|
c1(k)=cx(i)
|
||||||
k=k+1
|
k=k+1
|
||||||
enddo
|
enddo
|
||||||
c1=cshift(c1,i0-ib)
|
c1=cshift(c1,i0-ib)
|
||||||
call four2a(c1,NFFT2,1,1,1) !c2c FFT back to time domain
|
call four2a(c1,NFFT2,1,1,1) !c2c FFT back to time domain
|
||||||
c1=c1/(NMAX*NFFT2)
|
fac=1.0/sqrt(float(NFFT1)*NFFT2)
|
||||||
|
c1=fac*c1
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine ft8_downsample
|
end subroutine ft8_downsample
|
||||||
|
@ -25,6 +25,8 @@ subroutine refspectrum(id2,id2b,kk,bclear,brefspec,buseref,fname)
|
|||||||
data first/.true./,blastuse/.false./
|
data first/.true./,blastuse/.false./
|
||||||
save
|
save
|
||||||
|
|
||||||
|
print*,fname
|
||||||
|
|
||||||
if(first) then
|
if(first) then
|
||||||
pi=4.0*atan(1.0)
|
pi=4.0*atan(1.0)
|
||||||
do i=0,NFFT-1
|
do i=0,NFFT-1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user