Minor tweaks to jt65sim.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6126 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2015-11-18 20:04:47 +00:00
parent 2bd812eb48
commit 8e0f970149
2 changed files with 29 additions and 17 deletions

View File

@ -1,5 +1,5 @@
# Set paths # Set paths
EXE_DIR = ../../wsjtx_exp_install_latest EXE_DIR = C:/JTSDK/wsjtx_exp/install/Debug/bin
QT_DIR = /usr/include/qt5 QT_DIR = /usr/include/qt5
INCPATH = -I${QT_DIR} -I${QT_DIR}/QtCore INCPATH = -I${QT_DIR} -I${QT_DIR}/QtCore
@ -12,9 +12,8 @@ CP = cp
RANLIB = ranlib RANLIB = ranlib
RM = rm -f RM = rm -f
FFLAGS = -I/opt/local/include -O2 -Wall -Wno-conversion \ FFLAGS = -O2 -Wall -Wno-conversion -fno-second-underscore
-fno-second-underscore -fbounds-check -DUNIX CFLAGS = -I. -fbounds-check -fPIE -DBIGSYM
CFLAGS = -I. -fPIE
# Default rules # Default rules
%.o: %.c %.o: %.c
@ -28,7 +27,7 @@ CFLAGS = -I. -fPIE
%.o: %.F90 %.o: %.F90
${FC} ${FFLAGS} -c $< ${FC} ${FFLAGS} -c $<
all: libjt9.a jt65 all: libjt9.a jt65 jt65sim
OBJS1 = astrosub.o astro0.o astro.o sun.o coord.o tmoonsub.o \ OBJS1 = astrosub.o astro0.o astro.o sun.o coord.o tmoonsub.o \
fmtmsg.o deg2grid.o\ fmtmsg.o deg2grid.o\
@ -36,7 +35,7 @@ OBJS1 = astrosub.o astro0.o astro.o sun.o coord.o tmoonsub.o \
igray.o fftw3mod.o packjt.o\ igray.o fftw3mod.o packjt.o\
four2a.o grid2deg.o wisdom.o \ four2a.o grid2deg.o wisdom.o \
symspec.o analytic.o db.o \ symspec.o analytic.o db.o \
encode232.o interleave9.o\ encode232.o interleave9.o \
entail.o fano232.o gran.o sync9.o decjt9.o \ entail.o fano232.o gran.o sync9.o decjt9.o \
fil3.o decoder.o timer.o \ fil3.o decoder.o timer.o \
twkfreq.o symspec2.o shell.o sync65.o peakup.o slope.o xcor.o\ twkfreq.o symspec2.o shell.o sync65.o peakup.o slope.o xcor.o\
@ -54,8 +53,22 @@ libjt9.a: $(OBJS1)
OBJS7 = jt65.o OBJS7 = jt65.o
jt65: $(OBJS7) libjt9.a libsfrsd.a jt65: $(OBJS7) libjt9.a libsfrsd.a
$(FC) -o jt65 $(OBJS7) -L. -ljt9 -lsfrsd -lfftw3f_threads -lfftw3f $(FC) -o jt65 $(OBJS7) -L. -L./sfrsd2 -ljt9 -lsfrsd \
$(CP) jt65 $(EXE_DIR) C:\JTSDK\fftw3f\libfftw3f-3.dll
OBJS2 = jt65sim.o wavhdr.o
jt65sim: $(OBJS2) libjt9.a
$(FC) -o jt65sim $(OBJS2) -L. -ljt9
$(CP) jt65sim.exe $(EXE_DIR)
init_rs.o: init_rs.c
$(CC) -c -DBIGSYM=1 -o init_rs.o init_rs.c
encode_rs.o: encode_rs.c
$(CC) -c -DBIGSYM=1 -o encode_rs.o encode_rs.c
decode_rs.o: decode_rs.c
$(CC) -c -DBIGSYM=1 -o decode_rs.o decode_rs.c
.PHONY : clean .PHONY : clean

View File

@ -7,7 +7,7 @@ program jt65sim
parameter (NTMAX=54) parameter (NTMAX=54)
parameter (NMAX=NTMAX*12000) parameter (NMAX=NTMAX*12000)
type(hdr) h type(hdr) h
integer*2 iwave(NMAX) !Generated waveform (no noise) integer*2 iwave(NMAX) !Generated waveform
integer*4 itone(126) !Channel symbols (values 0-65) integer*4 itone(126) !Channel symbols (values 0-65)
integer dgen(12),sent(63) integer dgen(12),sent(63)
real*4 dat(NMAX) real*4 dat(NMAX)
@ -56,11 +56,8 @@ program jt65sim
h=default_header(12000,npts) h=default_header(12000,npts)
do ifile=1,nfiles !Loop over all files do ifile=1,nfiles !Loop over all files
nmin=ifile write(fname,1002) ifile !Output filename
ihr=nmin/60 1002 format('000000_',i4.4)
imin=mod(nmin,60)
write(fname,1002) ihr,imin !Output filename
1002 format('000000_',2i2.2)
open(10,file=fname//'.wav',access='stream',status='unknown') open(10,file=fname//'.wav',access='stream',status='unknown')
if(snrdb.lt.90) then if(snrdb.lt.90) then
@ -77,6 +74,8 @@ program jt65sim
if(mod(nsigs,2).eq.1) f0=1500.0 + dfsig*(isig-(nsigs+1)/2) if(mod(nsigs,2).eq.1) f0=1500.0 + dfsig*(isig-(nsigs+1)/2)
nsnr=nint(snrdb) nsnr=nint(snrdb)
if(snrdb.eq.0.0) nsnr=-19 - isig if(snrdb.eq.0.0) nsnr=-19 - isig
if(csubmode.eq.'B' .and. snrdb.eq.0.0) nsnr=-21 - isig
if(csubmode.eq.'C' .and. snrdb.eq.0.0) nsnr=-21 - isig
write(msg,1010) nsnr write(msg,1010) nsnr
1010 format('K1ABC W9XYZ ',i3.2) 1010 format('K1ABC W9XYZ ',i3.2)
@ -96,9 +95,10 @@ program jt65sim
enddo enddo
sig=10.0**(0.05*nsnr) sig=10.0**(0.05*nsnr)
! sig=1.122*sig
if(nsnr.gt.90.0) sig=1.0 if(nsnr.gt.90.0) sig=1.0
write(*,1020) ifile,isig,f0,csubmode,nsnr,sig,msg write(*,1020) ifile,isig,f0,csubmode,nsnr,sig,msg
1020 format(i3,i4,f10.3,1x,a1,i5,f8.4,2x,a22) 1020 format(i4,i4,f10.3,1x,a1,i5,f8.4,2x,a22)
phi=0.d0 phi=0.d0
dphi=0.d0 dphi=0.d0
@ -120,12 +120,11 @@ program jt65sim
enddo enddo
enddo enddo
fac=32767.0/nsigs !### ??? ### fac=32767.0/nsigs
if(snrdb.ge.90.0) iwave(1:npts)=nint(fac*dat(1:npts)) if(snrdb.ge.90.0) iwave(1:npts)=nint(fac*dat(1:npts))
if(snrdb.lt.90.0) iwave(1:npts)=nint(rms*dat(1:npts)) if(snrdb.lt.90.0) iwave(1:npts)=nint(rms*dat(1:npts))
write(10) h,iwave(1:npts) write(10) h,iwave(1:npts)
close(10) close(10)
enddo enddo
999 end program jt65sim 999 end program jt65sim