From 60955db247defad11ac99add69f9b9b6a91df735 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 11 Sep 2014 15:32:22 +0000 Subject: [PATCH] Resurrect jt9sim, in case we need it. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4305 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/Makefile.jtsdk | 2 +- lib/jt9sim.f90 | 16 +++++++++------- lib/t1.f90 | 32 -------------------------------- 3 files changed, 10 insertions(+), 40 deletions(-) delete mode 100644 lib/t1.f90 diff --git a/lib/Makefile.jtsdk b/lib/Makefile.jtsdk index 4580414e8..135804caf 100644 --- a/lib/Makefile.jtsdk +++ b/lib/Makefile.jtsdk @@ -28,7 +28,7 @@ CFLAGS = -I. -fbounds-check -mno-stack-arg-probe %.o: %.F90 ${FC} ${FFLAGS} -c $< -all: libjt9.a libastro.a jt9.exe jt9code.exe jt65code.exe +all: libjt9.a libastro.a jt9.exe jt9code.exe jt65code.exe jt9sim.exe OBJS1 = pctile.o graycode.o sort.o ssort.o chkmsg.o \ unpackmsg.o igray.o unpackcall.o unpackgrid.o \ diff --git a/lib/jt9sim.f90 b/lib/jt9sim.f90 index f4f0cf62f..004281dff 100644 --- a/lib/jt9sim.f90 +++ b/lib/jt9sim.f90 @@ -19,8 +19,8 @@ program jt9sim nargs=iargc() if(nargs.ne.6) then - print*,'Usage: jt9sim "message" fspan nsigs minutes SNR nfiles' - print*,'Example: "CQ K1ABC FN42" 200 20 2 -28 1' + print*,'Usage: jt9sim "message" fspan nsigs minutes SNR nfiles' + print*,'Example: jt9sim "CQ K1ABC FN42" 200 20 2 -28 1' print*,' ' print*,'Enter message = "" to use entries in msgs.txt.' print*,'Enter SNR = 0 to generate a range of SNRs.' @@ -54,7 +54,9 @@ program jt9sim if(minutes.eq.30) nsps=252000 if(nsps.eq.0) stop 'Bad value for minutes.' - f0=1400.d0 !Center frequency (Hz) +! f0=1400.d0 !Center frequency (Hz) + f0=3000.d0 !Center frequency (Hz) + ! f0=1500.0 ! if(minutes.eq.5) f0=1100. ! if(minutes.eq.10) f0=1050. @@ -65,7 +67,7 @@ program jt9sim if(msg0(1:3).eq.'sin') read(msg0(4:),*) sinfreq - open(12,file='msgs.txt',status='old') + if(message.eq."") open(12,file='msgs.txt',status='old') write(*,1000) 1000 format('File N freq S/N Message'/ & @@ -88,7 +90,7 @@ program jt9sim endif if(msg0.ne.' ') then - call genjt9(message,msgsent,i4tone) !Encode message into tone #s + call genjt9(message,0,msgsent,i4tone,itext) !Encode message into tone #s endif rewind 12 @@ -154,8 +156,8 @@ program jt9sim i4=-10 if(i1Bits(i).eq.1) i4=10 i4=i4+128 - if(i4.le.127) i1SoftSymbols(k)=i4 - if(i4.ge.128) i1SoftSymbols(k)=i4-256 + if(i4.le.127) i1SoftSymbols(i)=i4 + if(i4.ge.128) i1SoftSymbols(i)=i4-256 enddo limit=1000 call decode9(i1SoftSymbols,limit,nlim,msg) diff --git a/lib/t1.f90 b/lib/t1.f90 deleted file mode 100644 index e15337dfc..000000000 --- a/lib/t1.f90 +++ /dev/null @@ -1,32 +0,0 @@ -program t1 - - character*22 msg - character*12 arg - complex c3(0:4096-1) - complex c5(0:4096-1) - - call getarg(1,arg) - read(arg,*) nfile - - do ifile=1,999 - read(51,end=999) nutc,nsnr,xdt,nfreq,msg,c3,c5 - write(*,1010) ifile,nutc,nsnr,xdt,nfreq,msg -1010 format(3i6,f7.1,i6,2x,a22) - - if(ifile.eq.nfile) then - c3=c5 - c3(1353:)=0 - call four2a(c3,2048,1,-1,1) - - df=12000.0/(128.0*2048.0) - do i=0,2048 - freq=i*df - if(i.ge.1024) freq=(i-2048)*df - s=1.e-4*(real(c3(i))**2 + aimag(c3(i))**2) - write(13,3001) i,freq,s -3001 format(i6,2f10.3) - enddo - endif - enddo - -999 end program t1