mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
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:
parent
3486c7b8aa
commit
b29bd33a86
@ -9,26 +9,32 @@ 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.
|
||||
|
||||
f=ifreq
|
||||
phi=0.
|
||||
k=12000 !Start audio at t = 1.0 s
|
||||
ntot=nsym*tsym/dt
|
||||
t=0.
|
||||
isym0=-1
|
||||
do i=1,ntot
|
||||
t=t+dt
|
||||
isym=nint(t/tsym) + 1
|
||||
if(isym.ne.isym0) then
|
||||
freq=f + itone(isym)*baud
|
||||
dphi=twopi*freq*dt
|
||||
isym0=isym
|
||||
endif
|
||||
phi=phi + dphi
|
||||
if(phi.gt.twopi) phi=phi-twopi
|
||||
xphi=phi
|
||||
k=k+1
|
||||
dat(k)=dat(k) + sig*sin(xphi)
|
||||
iters=1
|
||||
if(nsym.eq.79) iters=2
|
||||
do iter=1,iters
|
||||
f=ifreq
|
||||
phi=0.
|
||||
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
|
||||
isym=nint(t/tsym) + 1
|
||||
if(isym.ne.isym0) then
|
||||
freq=f + itone(isym)*baud
|
||||
dphi=twopi*freq*dt
|
||||
isym0=isym
|
||||
endif
|
||||
phi=phi + dphi
|
||||
if(phi.gt.twopi) phi=phi-twopi
|
||||
xphi=phi
|
||||
k=k+1
|
||||
dat(k)=dat(k) + sig*sin(xphi)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
return
|
||||
|
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user