From 337f53cac96103ddbef22a8f1792be94933f0034 Mon Sep 17 00:00:00 2001 From: Pavel Demin Date: Sun, 1 Apr 2018 22:08:21 +0200 Subject: [PATCH] set sample rate to 4000 --- baseline.f90 | 2 +- ft8_downsample.f90 | 14 +++++++------- ft8_params.f90 | 8 ++++---- ft8b.f90 | 2 +- ft8d.f90 | 12 ++++++------ genft8refsig.f90 | 8 ++++---- subtractft8.f90 | 10 +++++----- sync8.f90 | 4 ++-- sync8d.f90 | 4 ++-- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/baseline.f90 b/baseline.f90 index 4d3e147..2b48836 100644 --- a/baseline.f90 +++ b/baseline.f90 @@ -12,7 +12,7 @@ subroutine baseline(s,nfa,nfb,sbase) real*8 x(1000),y(1000),a(5) data nseg/10/,npct/10/ - df=6000.0/NFFT1 !3.125 Hz + df=4000.0/NFFT1 !3.125 Hz ia=max(1,nint(nfa/df)) ib=nint(nfb/df) do i=ia,ib diff --git a/ft8_downsample.f90 b/ft8_downsample.f90 index ca5868b..e07a036 100644 --- a/ft8_downsample.f90 +++ b/ft8_downsample.f90 @@ -2,8 +2,8 @@ subroutine ft8_downsample(dd,newdat,f0,c1) ! Downconvert to complex data sampled at 200 Hz ==> 32 samples/symbol - parameter (NMAX=15*6000,NSPS=960) - parameter (NFFT1=96000,NFFT2=3200) !96000/30 = 3200 + parameter (NMAX=15*4000,NSPS=640) + parameter (NFFT1=64000,NFFT2=3200) !64000/20 = 3200 logical newdat complex c1(0:NFFT2-1) @@ -20,13 +20,13 @@ subroutine ft8_downsample(dd,newdat,f0,c1) newdat=.false. endif - if(f0.lt.3000.0) then - f=f0+3000.0 + if(f0.lt.2000.0) then + f=f0+2000.0 else - f=f0-3000.0 + f=f0-2000.0 endif - df=6000.0/NFFT1 - baud=6000.0/NSPS + df=4000.0/NFFT1 + baud=4000.0/NSPS i0=nint(f/df) ft=f+8.0*baud it=min(nint(ft/df),NFFT1) diff --git a/ft8_params.f90 b/ft8_params.f90 index f4ac895..4416519 100644 --- a/ft8_params.f90 +++ b/ft8_params.f90 @@ -3,10 +3,10 @@ parameter (KK=87) !Information bits (75 + CRC12) parameter (ND=58) !Data symbols parameter (NS=21) !Sync symbols (3 @ Costas 7x7) parameter (NN=NS+ND) !Total channel symbols (79) -parameter (NSPS=960) !Samples per symbol at 6000 S/s -parameter (NZ=NSPS*NN) !Samples in full 15 s waveform (75,840) -parameter (NMAX=15*6000) !Samples in iwave (90,000) +parameter (NSPS=640) !Samples per symbol at 4000 S/s +parameter (NZ=NSPS*NN) !Samples in full 15 s waveform (50,560) +parameter (NMAX=15*4000) !Samples in iwave (60,000) parameter (NFFT1=2*NSPS, NH1=NFFT1/2) !Length of FFTs for symbol spectra parameter (NSTEP=NSPS/4) !Rough time-sync step size parameter (NHSYM=NMAX/NSTEP-3) !Number of symbol spectra (1/4-sym steps) -parameter (NDOWN=30) !Downsample factor +parameter (NDOWN=20) !Downsample factor diff --git a/ft8b.f90 b/ft8b.f90 index f046dbb..bdfecab 100644 --- a/ft8b.f90 +++ b/ft8b.f90 @@ -76,7 +76,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & max_iterations=30 nharderrors=-1 - fs2=6000.0/NDOWN + fs2=4000.0/NDOWN dt2=1.0/fs2 twopi=8.0*atan(1.0) delfbest=0. diff --git a/ft8d.f90 b/ft8d.f90 index aeb37b6..8677b5c 100644 --- a/ft8d.f90 +++ b/ft8d.f90 @@ -25,14 +25,14 @@ program ft8d nfiles=nargs twopi=8.0*atan(1.0) - fs=6000.0 !Sample rate + fs=4000.0 !Sample rate dt=1.0/fs !Sample interval (s) tt=NSPS*dt !Duration of "itone" symbols (s) ts=2*NSPS*dt !Duration of OQPSK symbols (s) baud=1.0/tt !Keying rate (baud) txt=NZ*dt !Transmission length (s) - nfa=-2000 - nfb=+2000 + nfa=-1600 + nfb=+1600 nfqso=0 do ifile=1,nfiles @@ -62,14 +62,14 @@ program ft8d if((ndecodes-n2).eq.0) cycle lsubtract=.false. endif - call sync8(dd,nfa+3000,nfb+3000,syncmin,nfqso+3000,s,candidate,ncand,sbase) + call sync8(dd,nfa+2000,nfb+2000,syncmin,nfqso+2000,s,candidate,ncand,sbase) do icand=1,ncand sync=candidate(3,icand) f1=candidate(1,icand) xdt=candidate(2,icand) xbase=10.0**(0.1*(sbase(nint(f1/3.125))-40.0)) nsnr0=min(99,nint(10.0*log10(sync) - 25.5)) ! ### empirical ### - call ft8b(dd,newdat,nQSOProgress,nfqso+3000,nftx,ndepth,lft8apon, & + call ft8b(dd,newdat,nQSOProgress,nfqso+2000,nftx,ndepth,lft8apon, & lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, & hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, & nbadcrc,iappass,iera,msg37,xsnr) @@ -93,7 +93,7 @@ program ft8d endif write(*,1004) nutc,ipass,iaptype,iappass, & nharderrors,dmin,hd,min(sync,999.0),nint(xsnr), & - xdt,nint(f1-3000+dialfreq),message + xdt,nint(f1-2000+dialfreq),message 1004 format(i6.6,3i2,i3,3f6.1,i4,f6.2,i9,1x,a22) endif enddo diff --git a/genft8refsig.f90 b/genft8refsig.f90 index 822fd3e..6893825 100644 --- a/genft8refsig.f90 +++ b/genft8refsig.f90 @@ -1,18 +1,18 @@ subroutine genft8refsig(itone,cref,f0) - complex cref(79*960) + complex cref(79*640) integer itone(79) real*8 twopi,phi,dphi,dt,xnsps data twopi/0.d0/ save twopi if( twopi .lt. 0.1 ) twopi=8.d0*atan(1.d0) - xnsps=960.d0 - dt=1.d0/6000.d0 + xnsps=640.d0 + dt=1.d0/4000.d0 phi=0.d0 k=1 do i=1,79 dphi=twopi*(f0*dt+itone(i)/xnsps) - do is=1,960 + do is=1,640 cref(k)=cmplx(cos(phi),sin(phi)) phi=mod(phi+dphi,twopi) k=k+1 diff --git a/subtractft8.f90 b/subtractft8.f90 index 26879b9..6f6ec88 100644 --- a/subtractft8.f90 +++ b/subtractft8.f90 @@ -9,7 +9,7 @@ subroutine subtractft8(dd,itone,f0,dt) use timer_module, only: timer - parameter (NMAX=15*6000,NFRAME=960*79) + parameter (NMAX=15*4000,NFRAME=640*79) parameter (NFFT=NMAX,NFILT=1400) real*4 window(-NFILT/2:NFILT/2) complex dd(NMAX) @@ -20,12 +20,12 @@ subroutine subtractft8(dd,itone,f0,dt) common/heap8/cref(NFRAME),camp(NMAX),cfilt(NMAX),cw(NMAX) save first - if(f0.lt.3000.0) then - f=f0+3000.0 + if(f0.lt.2000.0) then + f=f0+2000.0 else - f=f0-3000.0 + f=f0-2000.0 endif - nstart=dt*6000+1 + nstart=dt*4000+1 call genft8refsig(itone,cref,f) camp=0. do i=1,nframe diff --git a/sync8.f90 b/sync8.f90 index 49e57ac..5a74554 100644 --- a/sync8.f90 +++ b/sync8.f90 @@ -22,8 +22,8 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase) ! Compute symbol spectra, stepping by NSTEP steps. savg=0. - tstep=NSTEP/6000.0 - df=6000.0/NFFT1 !3.125 Hz + tstep=NSTEP/4000.0 + df=4000.0/NFFT1 !3.125 Hz fac=1.0/300.0 do j=1,NHSYM ia=(j-1)*NSTEP + 1 diff --git a/sync8d.f90 b/sync8d.f90 index 2868c09..dc7bd20 100644 --- a/sync8d.f90 +++ b/sync8d.f90 @@ -2,7 +2,7 @@ subroutine sync8d(cd0,i0,ctwk,itwk,sync) ! Compute sync power for a complex, downsampled FT8 signal. - parameter(NP2=2812,NDOWN=30) + parameter(NP2=2812,NDOWN=20) complex cd0(3125) complex csync(0:6,32) complex csync2(32) @@ -19,7 +19,7 @@ subroutine sync8d(cd0,i0,ctwk,itwk,sync) ! Set some constants and compute the csync array. if( first ) then twopi=8.0*atan(1.0) - fs2=6000.0/NDOWN !Sample rate after downsampling + fs2=4000.0/NDOWN !Sample rate after downsampling dt2=1/fs2 !Corresponding sample interval taus=32*dt2 !Symbol duration baud=1.0/taus !Keying rate