1
0
mirror of https://github.com/saitohirga/WSJT-X.git synced 2025-03-23 20:48:33 -04:00

In ft8_downsample, compute long FFT only when data have changed.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7780 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-07-03 19:52:36 +00:00
parent 4bce86d61e
commit ab3832fa82
4 changed files with 18 additions and 13 deletions

View File

@ -28,7 +28,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
end type counting_ft8_decoder
real ss(184,NSMAX)
logical baddata,newdat65,newdat9,single_decode,bVHF,bad0
logical baddata,newdat65,newdat9,single_decode,bVHF,bad0,newdat
integer*2 id2(NTMAX*12000)
type(params_block) :: params
real*4 dd(NTMAX*12000)
@ -69,8 +69,9 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
if(params%nmode.eq.8) then
! We're in FT8 mode
call timer('decft8 ',0)
newdat=params%newdat
call my_ft8%decode(ft8_decoded,id2,params%nfqso, &
newdat9,params%nutc,params%nfa, &
newdat,params%nutc,params%nfa, &
params%nfb,logical(params%nagain), &
params%ndepth,params%nsubmode)
call timer('decft8 ',1)

View File

@ -1,4 +1,4 @@
subroutine ft8b(dd0,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
subroutine ft8b(dd0,newdat,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
use timer_module, only: timer
include 'ft8_params.f90'
@ -17,7 +17,7 @@ subroutine ft8b(dd0,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
complex csync(0:6,32)
complex ctwk(32)
complex csymb(32)
logical first
logical newdat,first
data icos7/2,5,6,0,4,1,3/
data first/.true./
save first,twopi,fs2,dt2,taus,baud,csync
@ -43,7 +43,7 @@ subroutine ft8b(dd0,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
norder=2
! if(abs(nfqso-f1).lt.10.0) norder=3
call timer('ft8_down',0)
call ft8_downsample(dd0,f1,cd0)
call ft8_downsample(dd0,newdat,f1,cd0)
call timer('ft8_down',1)
i0=xdt*fs2
@ -189,22 +189,28 @@ subroutine ft8b(dd0,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
return
end subroutine ft8b
subroutine ft8_downsample(dd,f0,c1)
subroutine ft8_downsample(dd,newdat,f0,c1)
! Downconvert to complex data sampled at 187.5 Hz, 32 samples/symbol
parameter (NMAX=15*12000)
parameter (NFFT1=200000,NFFT2=3125) !200000/64 = 3125
logical newdat
complex c1(0:NFFT2-1)
complex cx(0:NFFT1/2)
real dd(NMAX),x(NFFT1)
equivalence (x,cx)
save x
save cx
if(newdat) then
! Data in dd have changed, recompute the long FFT
x(1:NMAX)=dd
x(NMAX+1:NFFT1)=0. !Zero-pad the x array
call four2a(cx,NFFT1,1,-1,0) !r2c FFT to freq domain
newdat=.false.
endif
df=12000.0/NFFT1
x(1:NMAX)=dd
x(NMAX+1:NFFT1)=0. !Zero-pad the x array
call four2a(cx,NFFT1,1,-1,0) !r2c FFT to freq domain
baud=12000.0/2048.0
i0=nint(f0/df)
ft=f0+8.0*baud

View File

@ -56,7 +56,7 @@ contains
xdt=candidate(2,icand)
nsnr=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ###
call timer('ft8b ',0)
call ft8b(dd,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
call ft8b(dd,newdat,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message,xsnr)
nsnr=xsnr
xdt=xdt-0.6
call timer('ft8b ',1)

View File

@ -25,8 +25,6 @@ subroutine refspectrum(id2,id2b,kk,bclear,brefspec,buseref,fname)
data first/.true./,blastuse/.false./
save
print*,fname
if(first) then
pi=4.0*atan(1.0)
do i=0,NFFT-1