Experimenting with a slow MSK144 mode.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7704 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-06-06 18:57:17 +00:00
parent 0af9d06351
commit 9cfadf6ccb
2 changed files with 22 additions and 18 deletions

View File

@ -9,13 +9,12 @@ subroutine makepings(pings,npts,width,sig)
do i=1,14 do i=1,14
t0(i)=i !Make pings at t=1, 2, ... 14 s. t0(i)=i !Make pings at t=1, 2, ... 14 s.
enddo enddo
w=width
amp=sig amp=sig
do i=1,npts do i=1,npts
iping=min(max(1,i/12000),14) iping=min(max(1,i/12000),14)
t=(i*dt-t0(iping))/w t=(i*dt-t0(iping))/width
if(t.lt.0.d0 .and. t.lt.10.0) then if(t.lt.0.d0 .and. t.lt.10.0) then !????
fac=0. fac=0.
else else
fac=2.718*t*dexp(-t) fac=2.718*t*dexp(-t)

View File

@ -15,10 +15,10 @@ program msk144sim
data mygrid/"EN50wc"/ data mygrid/"EN50wc"/
nargs=iargc() nargs=iargc()
if(nargs.ne.5) then if(nargs.ne.6) then
print*,'Usage: msk144sim message freq width snr nfiles' print*,'Usage: msk144sim message freq width nfac snr nfiles'
print*,' ' print*,'Example: msk144sim "K1ABC W9XYZ EN37" 1500 0.12 1 2 1'
print*,'Example: msk144sim "K1ABC W9XYZ EN37" 1500 0.12 2 1' print*,' msk144sim "K1ABC W9XYZ EN37" 1500 2.5 32 -15 1'
go to 999 go to 999
endif endif
call getarg(1,msg) call getarg(1,msg)
@ -27,8 +27,10 @@ program msk144sim
call getarg(3,arg) call getarg(3,arg)
read(arg,*) width read(arg,*) width
call getarg(4,arg) call getarg(4,arg)
read(arg,*) snrdb read(arg,*) nfac
call getarg(5,arg) call getarg(5,arg)
read(arg,*) snrdb
call getarg(6,arg)
read(arg,*) nfiles read(arg,*) nfiles
!sig is the peak amplitude of the ping. !sig is the peak amplitude of the ping.
@ -42,12 +44,15 @@ program msk144sim
twopi=8.d0*atan(1.d0) twopi=8.d0*atan(1.d0)
nsym=144 nsym=144
nsps=6*nfac
if( itone(41) .lt. 0 ) nsym=40 if( itone(41) .lt. 0 ) nsym=40
dphi0=twopi*(freq-500)/12000.0 baud=2000.d0/nfac
dphi1=twopi*(freq+500)/12000.0 dphi0=twopi*(freq-0.25d0*baud)/12000.d0
dphi1=twopi*(freq+0.25d0*baud)/12000.d0
phi=0.0 phi=0.0
indx=0 k=0
nreps=NMAX/(nsym*6) nreps=NMAX/(nsym*nsps)
print*,nsym,nfac,nsps,baud,freq
do jrep=1,nreps do jrep=1,nreps
do i=1,nsym do i=1,nsym
if( itone(i) .eq. 0 ) then if( itone(i) .eq. 0 ) then
@ -55,9 +60,9 @@ program msk144sim
else else
dphi=dphi1 dphi=dphi1
endif endif
do j=1,6 do j=1,nsps
waveform(indx)=cos(phi); waveform(k)=cos(phi)
indx=indx+1 k=k+1
phi=mod(phi+dphi,twopi) phi=mod(phi+dphi,twopi)
enddo enddo
enddo enddo
@ -68,7 +73,7 @@ program msk144sim
go to 999 go to 999
endif endif
call makepings(pings,NMAX,width,sig) if(nfac.eq.1) call makepings(pings,NMAX,width,sig)
! call sgran() ! call sgran()
do ifile=1,nfiles !Loop over requested number of files do ifile=1,nfiles !Loop over requested number of files
@ -81,8 +86,8 @@ program msk144sim
fac=sqrt(6000.0/2500.0) fac=sqrt(6000.0/2500.0)
do i=0,NMAX-1 do i=0,NMAX-1
xx=gran() xx=gran()
wave(i)=pings(i)*waveform(i) + fac*xx if(nfac.eq.1) wave(i)=pings(i)*waveform(i) + fac*xx
! wave(i)=sig*waveform(i) + fac*xx if(nfac.gt.1) wave(i)=sig*waveform(i) + fac*xx
iwave(i)=30.0*wave(i) iwave(i)=30.0*wave(i)
enddo enddo