Utility for generating figure for QST/RadCom article.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7973 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-08-01 18:01:27 +00:00
parent 3486c7b8aa
commit b29bd33a86
2 changed files with 35 additions and 22 deletions

View File

@ -9,12 +9,17 @@ subroutine addit(itone,nfsample,nsym,nsps,ifreq,sig,dat)
fsample=12000.d0 !Sample rate (Hz)
dt=1.d0/fsample !Sample interval (s)
twopi=8.d0*atan(1.d0)
dphi=0.
iters=1
if(nsym.eq.79) iters=2
do iter=1,iters
f=ifreq
phi=0.
k=12000 !Start audio at t = 1.0 s
ntot=nsym*tsym/dt
k=12000 !Start audio at t = 1.0 s
t=0.
if(nsym.eq.79) k=12000 + (iter-1)*12000*30 !Special case for FT8
isym0=-1
do i=1,ntot
t=t+dt
@ -30,6 +35,7 @@ subroutine addit(itone,nfsample,nsym,nsps,ifreq,sig,dat)
k=k+1
dat(k)=dat(k) + sig*sin(xphi)
enddo
enddo
return
end subroutine addit

View File

@ -11,8 +11,10 @@ program allsim
integer*2 iwave(NMAX) !Generated waveform (no noise)
integer itone(206) !Channel symbols (values 0-8)
integer icw(250)
integer*1 msgbits(87)
logical*1 bcontest
real*4 dat(NMAX)
character message*22,msgsent*22,arg*8
character message*22,msgsent*22,arg*8,mygrid*6
nargs=iargc()
if(nargs.ne.1) then
@ -24,6 +26,8 @@ program allsim
read(arg,*) snrdb !S/N in dB (2500 hz reference BW)
message='CQ KA2ABC FN20'
mygrid='FN20 '
bcontest=.false.
rmsdb=25.
rms=10.0**(0.05*rmsdb)
sig=10.0**(0.05*snrdb)
@ -56,11 +60,14 @@ program allsim
call gen4(message,0,msgsent,itone,itype)
call addit(itone,11025,206,2520,1200,sig,dat) !JT4
call genft8(message,mygrid,bcontest,msgsent,msgbits,itone)
call addit(itone,12000,79,1920,1400,sig,dat) !FT8
call genqra64(message,0,msgsent,itone,itype)
call addit(itone,12000,84,6912,1400,sig,dat) !QRA64
call addit(itone,12000,84,6912,1600,sig,dat) !QRA64
call gen65(message,0,msgsent,itone,itype)
call addit(itone,11025,126,4096,1600,sig,dat) !JT65
call addit(itone,11025,126,4096,1800,sig,dat) !JT65
iwave(1:npts)=nint(rms*dat(1:npts))