mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
When SNR>90 dB is specified, simulated signal is noiseless. If Doppler spread is nonzero, then signal will have random peak amplitude. In this case normalize the signal so that peak amplitude=32767.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8391 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
df6fe7a600
commit
b7543dce08
@ -283,13 +283,15 @@ program jt65sim
|
||||
endif
|
||||
|
||||
dat=aimag(cdat) + xnoise !Add the generated noise
|
||||
fac=32767.0/nsigs
|
||||
if(snrdb.ge.90.0) iwave(1:npts)=nint(fac*dat(1:npts))
|
||||
|
||||
if(snrdb.lt.90.0) then
|
||||
if(any(dat.gt.32767.0/rms)) print*,"Warning - data will be clipped."
|
||||
iwave(1:npts)=nint(rms*dat(1:npts))
|
||||
dat=rms*dat(1:npts)
|
||||
else
|
||||
datpk=maxval(abs(dat))
|
||||
fac=32766.9/datpk
|
||||
dat=fac*dat(1:npts)
|
||||
endif
|
||||
if(any(dat.gt.32767.0)) print*,"Warning - data will be clipped."
|
||||
iwave(1:npts)=real(dat(1:npts))
|
||||
write(10) h,iwave(1:npts) !Save the .wav file
|
||||
close(10)
|
||||
enddo
|
||||
|
Loading…
Reference in New Issue
Block a user