mirror of
https://github.com/pavel-demin/ft8d.git
synced 2025-02-03 09:44:19 -05:00
set sample rate to 6000
This commit is contained in:
parent
60c33e05cf
commit
c18015f19d
@ -6,13 +6,13 @@ subroutine baseline(s,nfa,nfb,sbase)
|
||||
|
||||
include 'ft8_params.f90'
|
||||
implicit real*8 (a-h,o-z)
|
||||
real*4 s(NSPS)
|
||||
real*4 sbase(NSPS)
|
||||
real*4 s(NFFT1)
|
||||
real*4 sbase(NFFT1)
|
||||
real*4 base
|
||||
real*8 x(1000),y(1000),a(5)
|
||||
data nseg/10/,npct/10/
|
||||
|
||||
df=12000.0/NFFT1 !3.125 Hz
|
||||
df=6000.0/NFFT1 !3.125 Hz
|
||||
ia=max(1,nint(nfa/df))
|
||||
ib=nint(nfb/df)
|
||||
do i=ia,ib
|
||||
|
@ -2,12 +2,12 @@ subroutine ft8_downsample(dd,newdat,f0,c1)
|
||||
|
||||
! Downconvert to complex data sampled at 200 Hz ==> 32 samples/symbol
|
||||
|
||||
parameter (NMAX=15*12000,NSPS=1920)
|
||||
parameter (NFFT1=192000,NFFT2=3200) !192000/60 = 3200
|
||||
parameter (NMAX=15*6000,NSPS=960)
|
||||
parameter (NFFT1=96000,NFFT2=3200) !96000/30 = 3200
|
||||
|
||||
logical newdat
|
||||
complex c1(0:NFFT2-1)
|
||||
complex cx(0:NFFT1/2)
|
||||
complex cx(0:NFFT1)
|
||||
complex dd(NMAX),x(NFFT1)
|
||||
equivalence (x,cx)
|
||||
save cx
|
||||
@ -20,12 +20,17 @@ subroutine ft8_downsample(dd,newdat,f0,c1)
|
||||
newdat=.false.
|
||||
endif
|
||||
|
||||
df=12000.0/NFFT1
|
||||
baud=12000.0/NSPS
|
||||
i0=nint(f0/df)
|
||||
ft=f0+8.0*baud
|
||||
it=min(nint(ft/df),NFFT1/2)
|
||||
fb=f0-1.0*baud
|
||||
if(f0.lt.3000.0) then
|
||||
f=f0+3000.0
|
||||
else
|
||||
f=f0-3000.0
|
||||
endif
|
||||
df=6000.0/NFFT1
|
||||
baud=6000.0/NSPS
|
||||
i0=nint(f/df)
|
||||
ft=f+8.0*baud
|
||||
it=min(nint(ft/df),NFFT1)
|
||||
fb=f-1.0*baud
|
||||
ib=max(1,nint(fb/df))
|
||||
k=0
|
||||
c1=0.
|
||||
|
@ -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=1920) !Samples per symbol at 12000 S/s
|
||||
parameter (NZ=NSPS*NN) !Samples in full 15 s waveform (151,680)
|
||||
parameter (NMAX=15*12000) !Samples in iwave (180,000)
|
||||
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 (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=60) !Downsample factor
|
||||
parameter (NDOWN=30) !Downsample factor
|
||||
|
2
ft8b.f90
2
ft8b.f90
@ -76,7 +76,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
|
||||
|
||||
max_iterations=30
|
||||
nharderrors=-1
|
||||
fs2=12000.0/NDOWN
|
||||
fs2=6000.0/NDOWN
|
||||
dt2=1.0/fs2
|
||||
twopi=8.0*atan(1.0)
|
||||
delfbest=0.
|
||||
|
21
ft8d.f90
21
ft8d.f90
@ -7,9 +7,10 @@ program ft8d
|
||||
character*22 allmessages(100)
|
||||
character*12 mycall12,hiscall12
|
||||
character*6 mygrid6,hisgrid6
|
||||
real s(NH1,NHSYM)
|
||||
real sbase(NH1)
|
||||
real s(NFFT1,NHSYM)
|
||||
real sbase(NFFT1)
|
||||
real candidate(3,200)
|
||||
real*8 dialfreq
|
||||
complex dd(NMAX)
|
||||
logical newdat,lsubtract,ldupe,bcontest
|
||||
integer apsym(KK)
|
||||
@ -24,20 +25,20 @@ program ft8d
|
||||
nfiles=nargs
|
||||
|
||||
twopi=8.0*atan(1.0)
|
||||
fs=12000.0 !Sample rate
|
||||
fs=6000.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=100
|
||||
nfb=3000
|
||||
nfqso=1500
|
||||
nfa=-2000
|
||||
nfb=+2000
|
||||
nfqso=0
|
||||
|
||||
do ifile=1,nfiles
|
||||
call getarg(ifile,infile)
|
||||
open(10,file=infile,status='old',access='stream')
|
||||
read(10,end=999) dd
|
||||
read(10,end=999) dialfreq,dd
|
||||
close(10)
|
||||
j2=index(infile,'.c2')
|
||||
read(infile(j2-6:j2-1),*) nutc
|
||||
@ -61,14 +62,14 @@ program ft8d
|
||||
if((ndecodes-n2).eq.0) cycle
|
||||
lsubtract=.false.
|
||||
endif
|
||||
call sync8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
|
||||
call sync8(dd,nfa+3000,nfb+3000,syncmin,nfqso+3000,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,nftx,ndepth,lft8apon, &
|
||||
call ft8b(dd,newdat,nQSOProgress,nfqso+3000,nftx,ndepth,lft8apon, &
|
||||
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
|
||||
hiscall12,bcontest,sync,f1,xdt,xbase,apsym,nharderrors,dmin, &
|
||||
nbadcrc,iappass,iera,msg37,xsnr)
|
||||
@ -92,7 +93,7 @@ program ft8d
|
||||
endif
|
||||
write(*,1004) nutc,ncand,icand,ipass,iaptype,iappass, &
|
||||
nharderrors,dmin,hd,min(sync,999.0),nint(xsnr), &
|
||||
xdt,nint(f1),message
|
||||
xdt,nint(f1-3000+dialfreq),message
|
||||
1004 format(i6.6,2i4,3i2,i3,3f6.1,i4,f6.2,i5,2x,a22)
|
||||
endif
|
||||
enddo
|
||||
|
@ -1,18 +1,18 @@
|
||||
subroutine genft8refsig(itone,cref,f0)
|
||||
complex cref(79*1920)
|
||||
complex cref(79*960)
|
||||
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=1920.d0
|
||||
dt=1.d0/12000.d0
|
||||
xnsps=960.d0
|
||||
dt=1.d0/6000.d0
|
||||
phi=0.d0
|
||||
k=1
|
||||
do i=1,79
|
||||
dphi=twopi*(f0*dt+itone(i)/xnsps)
|
||||
do is=1,1920
|
||||
do is=1,960
|
||||
cref(k)=cmplx(cos(phi),sin(phi))
|
||||
phi=mod(phi+dphi,twopi)
|
||||
k=k+1
|
||||
|
@ -9,7 +9,7 @@ subroutine subtractft8(dd,itone,f0,dt)
|
||||
|
||||
use timer_module, only: timer
|
||||
|
||||
parameter (NMAX=15*12000,NFRAME=1920*79)
|
||||
parameter (NMAX=15*6000,NFRAME=960*79)
|
||||
parameter (NFFT=NMAX,NFILT=1400)
|
||||
real*4 window(-NFILT/2:NFILT/2)
|
||||
complex dd(NMAX)
|
||||
@ -20,7 +20,7 @@ subroutine subtractft8(dd,itone,f0,dt)
|
||||
common/heap8/cref(NFRAME),camp(NMAX),cfilt(NMAX),cw(NMAX)
|
||||
save first
|
||||
|
||||
nstart=dt*12000+1
|
||||
nstart=dt*6000+1
|
||||
call genft8refsig(itone,cref,f0)
|
||||
camp=0.
|
||||
do i=1,nframe
|
||||
|
25
sync8.f90
25
sync8.f90
@ -3,18 +3,18 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
|
||||
include 'ft8_params.f90'
|
||||
! Search over +/- 2.5s relative to 0.5s TX start time.
|
||||
parameter (JZ=62)
|
||||
complex cx(0:NH1)
|
||||
real s(NH1,NHSYM)
|
||||
real savg(NH1)
|
||||
real sbase(NH1)
|
||||
complex cx(0:NFFT1-1)
|
||||
real s(NFFT1,NHSYM)
|
||||
real savg(NFFT1)
|
||||
real sbase(NFFT1)
|
||||
complex x(NFFT1)
|
||||
real sync2d(NH1,-JZ:JZ)
|
||||
real red(NH1)
|
||||
real sync2d(NFFT1,-JZ:JZ)
|
||||
real red(NFFT1)
|
||||
real candidate0(3,200)
|
||||
real candidate(3,200)
|
||||
complex dd(NMAX)
|
||||
integer jpeak(NH1)
|
||||
integer indx(NH1)
|
||||
integer jpeak(NFFT1)
|
||||
integer indx(NFFT1)
|
||||
integer ii(1)
|
||||
integer icos7(0:6)
|
||||
data icos7/2,5,6,0,4,1,3/ !Costas 7x7 tone pattern
|
||||
@ -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/12000.0
|
||||
df=12000.0/NFFT1 !3.125 Hz
|
||||
tstep=NSTEP/6000.0
|
||||
df=6000.0/NFFT1 !3.125 Hz
|
||||
fac=1.0/300.0
|
||||
do j=1,NHSYM
|
||||
ia=(j-1)*NSTEP + 1
|
||||
@ -32,9 +32,10 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
|
||||
x(NSPS+1:)=0.
|
||||
call four2a(x,NFFT1,1,-1,1) !c2c FFT
|
||||
do i=1,NH1
|
||||
s(i,j)=real(cx(i))**2 + aimag(cx(i))**2
|
||||
s(i,j)=real(cx(i+NH1))**2 + aimag(cx(i+NH1))**2
|
||||
s(i+NH1,j)=real(cx(i))**2 + aimag(cx(i))**2
|
||||
enddo
|
||||
savg=savg + s(1:NH1,j) !Average spectrum
|
||||
savg=savg + s(1:NFFT1,j) !Average spectrum
|
||||
enddo
|
||||
call baseline(savg,nfa,nfb,sbase)
|
||||
! savg=savg/NHSYM
|
||||
|
@ -2,7 +2,7 @@ subroutine sync8d(cd0,i0,ctwk,itwk,sync)
|
||||
|
||||
! Compute sync power for a complex, downsampled FT8 signal.
|
||||
|
||||
parameter(NP2=2812,NDOWN=60)
|
||||
parameter(NP2=2812,NDOWN=30)
|
||||
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=12000.0/NDOWN !Sample rate after downsampling
|
||||
fs2=6000.0/NDOWN !Sample rate after downsampling
|
||||
dt2=1/fs2 !Corresponding sample interval
|
||||
taus=32*dt2 !Symbol duration
|
||||
baud=1.0/taus !Keying rate
|
||||
|
Loading…
Reference in New Issue
Block a user