mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-12-23 19:25:37 -05:00
Updates to test programs.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7659 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
b256185ed1
commit
aef539ec3f
@ -505,6 +505,7 @@ set (wsjt_FSRCS
|
||||
lib/wqencode.f90
|
||||
lib/fsk4hf/wspr5d.f90
|
||||
lib/fsk4hf/wspr5sim.f90
|
||||
lib/fsk4hf/wspr5_downsample.f90
|
||||
lib/fsk4hf/wspr5_wav.f90
|
||||
lib/fsk4hf/wsprlfsim.f90
|
||||
lib/wspr_downsample.f90
|
||||
|
26
lib/fsk4hf/wspr5_downsample.f90
Normal file
26
lib/fsk4hf/wspr5_downsample.f90
Normal file
@ -0,0 +1,26 @@
|
||||
subroutine wspr5_downsample(iwave,c)
|
||||
|
||||
include 'wsprlf_params.f90'
|
||||
parameter (NMAX=300*12000,NFFT2=NMAX/30)
|
||||
integer*2 iwave(NMAX)
|
||||
complex c(0:NZ-1)
|
||||
complex c1(0:NFFT2-1)
|
||||
complex cx(0:NMAX/2)
|
||||
real x(NMAX)
|
||||
equivalence (x,cx)
|
||||
|
||||
df=12000.0/NMAX
|
||||
x=iwave
|
||||
call four2a(x,NMAX,1,-1,0) !r2c FFT to freq domain
|
||||
i0=nint(1500.0/df)
|
||||
c1(0)=cx(i0)
|
||||
do i=1,NFFT2/2
|
||||
c1(i)=cx(i0+i)
|
||||
c1(NFFT2-i)=cx(i0-i)
|
||||
enddo
|
||||
c1=c1/NFFT2
|
||||
call four2a(c1,NFFT2,1,1,1) !c2c FFT back to time domain
|
||||
c=c1(0:NZ-1)
|
||||
|
||||
return
|
||||
end subroutine wspr5_downsample
|
@ -37,8 +37,6 @@ subroutine wspr5_wav(baud,xdt,f0,itone,snrdb,iwave)
|
||||
if(k.gt.0 .and. k.le.NMAX) dat(k)=dat(k) + sig*sin(xphi)
|
||||
enddo
|
||||
enddo
|
||||
print*,NN,NSPS0,k
|
||||
|
||||
fac=32767.0
|
||||
rms=100.0
|
||||
if(snrdb.ge.90.0) iwave=nint(fac*dat)
|
||||
|
@ -31,6 +31,7 @@ program wspr5d
|
||||
integer ierror(NS+ND)
|
||||
integer isync(48) !Long sync vector
|
||||
integer ib13(13) !Barker 13 code
|
||||
integer ihdr(11)
|
||||
integer*8 n8
|
||||
integer*2 iwave(NMAX) !Generated full-length waveform
|
||||
integer*1 idat(7)
|
||||
@ -91,6 +92,9 @@ program wspr5d
|
||||
read(10,end=999) fname,ntrmin,fMHz,c
|
||||
close(10)
|
||||
read(fname(8:11),*) nutc
|
||||
else if(index(infile,'.wav').gt.0) then
|
||||
read(10,end=999) ihdr,iwave
|
||||
call wspr5_downsample(iwave,c)
|
||||
else
|
||||
print*,'Wrong file format?'
|
||||
go to 999
|
||||
@ -188,3 +192,5 @@ program wspr5d
|
||||
enddo ! ifile loop
|
||||
|
||||
999 end program wspr5d
|
||||
|
||||
include 'wspr5_downsample.f90'
|
||||
|
@ -94,6 +94,8 @@ program wspr5sim
|
||||
write(10) h,iwave !Save the .wav file
|
||||
close(10)
|
||||
endif
|
||||
write(*,1110) ifile,xdt,f0,snrdb,fname
|
||||
1110 format(i4,f7.2,f8.2,f7.1,2x,a16)
|
||||
enddo
|
||||
|
||||
999 end program wspr5sim
|
||||
|
Loading…
Reference in New Issue
Block a user