set sample rate to 4000

This commit is contained in:
Pavel Demin 2018-04-01 22:08:21 +02:00
parent e9551b7f10
commit 337f53cac9
9 changed files with 32 additions and 32 deletions

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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