Linux makefile additions for plrr, plrs.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@454 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-07-02 16:03:44 +00:00
parent eba299aeff
commit f15ca0266d
5 changed files with 36 additions and 25 deletions

View File

@ -36,9 +36,9 @@ RM ?= @RM@
F2PY = @F2PY@
###
all: Audio.so
all: Audio.so plrs plrr
OBJS2C = init_rs.o encode_rs.o decode_rs.o plrr_subs.o loc.o
OBJS2C = init_rs.o encode_rs.o decode_rs.o plrr_subs.o loc.o deep65.o
F2PYONLY = ftn_init ftn_quit audio_init getfile azdist0 astro0 \
spec map65a0
@ -54,7 +54,7 @@ SRCS2F77 = indexx.f gen65.f chkmsg.f \
gentone.f gencwid.f set.f db.f pctile.f sort.f ssort.f \
avemsg65.f demod64a.f encode65.f extract.f four2a.f getpfx1.f \
getpfx2.f graycode.f grid2k.f interleave63.f k2grid.f \
deep65.f morse.f nchar.f packcall.f packgrid.f \
morse.f nchar.f packcall.f packgrid.f \
packmsg.f packtext.f setup65.f unpackcall.f unpackgrid.f \
unpackmsg.f unpacktext.f astro.f azdist.f coord.f dcoord.f \
deg2grid.f dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f \
@ -71,7 +71,7 @@ SRCS3C = ptt_unix.c igray.c wrapkarn.c cutil.c
OBJS3C = ${SRCS3C:.c=.o}
AUDIOSRCS = a2d.f90 jtaudio.c resample.c start_portaudio.c
#Audio.so: $(OBJS2C) $(SRCS2F90) $(SRCS2F77) $(SRCS2C)
#Audio.so: $(OBJS2C) $(SRCS2F90) $(SRCS2F77) $(SRCS2C)
# python f2py.py -c \
# --quiet --"fcompiler=compaqv" \
# --opt="/nologo /traceback /warn:errors /fast /fpp /define:Win32 \
@ -107,10 +107,16 @@ encode_rs_int.o: encode_rs.c
decode_rs_int.o: decode_rs.c
$(CC) $(CFLAGS) -c -DBIGSYM=1 -o decode_rs_int.o decode_rs.c
plrr: plrr.f90 sec_midn.F90 plrr_subs.c cutil.c
$(FC) -o plrr plrr.f90 sec_midn.F90 plrr_subs.c cutil.c
plrs: plrs.f90 sec_midn.F90 plrs_subs.c cutil.c
$(FC) -o plrs plrs.f90 sec_midn.F90 plrs_subs.c cutil.c
.PHONY : clean
clean:
${RM} -f *.o *.pyc *.so *~ map65
(cd portaudio-v19;${MAKE} clean)
# (cd portaudio-v19;${MAKE} clean)
distclean: clean
${RM} -f config.log config.status Makefile
(cd portaudio-v19;${MAKE} distclean)

View File

@ -81,7 +81,7 @@ time_t time_(void)
double hrtime_(void)
{
struct timeval tv;
struct timezone tz;
gettimeofday(&tv,&tz);
gettimeofday(&tv,NULL);
return(tv.tv_sec+1.e-6*tv.tv_usec);
}

View File

@ -1,6 +1,6 @@
*font: Arial 8
*Label*font: Arial 8
*Text*font: "Courier New" 9
*font: Arial 10
*Label*font: Arial 10
*Text*font: "Courier New" 12
*Canvas*font: "Lucida Console" 16
*background: gray85
*Text*background: white

View File

@ -6,16 +6,15 @@ program plrr
integer*2 nblock
real*8 center_freq,buf8
common/plrscom/center_freq,msec,fselect,iptr,nblock,userx_no,iusb,buf8(174)
! 8 4 4 4 2 1 1 1392
call setup_rsocket
npkt=0
ns0=-99
10 call recv_pkt(center_freq)
npkt=npkt+1
if(mod(npkt,1000).eq.0) write(*,1010) npkt,center_freq,0.001*msec,fselect
1010 format('npkt:',i10,' f0:',f8.3,' t:',f10.3,' fselect:',f10.3)
ns=mod(msec/1000,60)
if(ns.ne.ns0) write(*,1010) ns,center_freq,0.001*msec,sec_midn()
1010 format('ns:',i3,' f0:',f10.3,' t1:',f10.3,' t2:',f10.3)
ns0=ns
go to 10
end program plrr

View File

@ -19,13 +19,12 @@ program plrs
logical fast,pause
real*8 center_freq,dmsec,dtmspacket,tmsec
common/plrscom/center_freq,msec2,fsample,iptr,nblock,userx_no,iusb,buf8(174)
! 8 4 4 4 2 1 1 1392
data nm/45,46,48,50,52,54,55,56,57,58,59/
data nblock/0/,fast/.false./,pause/.false./
nargs=iargc()
if(nargs.ne.3) then
print*,'Usage: plrs <fast|pause|slow> <minutes> <iters>'
if(nargs.ne.4) then
print*,'Usage: plrs <fast|pause|slow> <minutes> <iters> <iwait>'
go to 999
endif
@ -36,8 +35,16 @@ program plrs
read(arg,*) nfiles
call getarg(3,arg)
read(arg,*) iters
call getarg(4,arg)
read(arg,*) iwait
fname="all.tf2"//char(0)
if(iwait.ne.0) then
1 if(mod(int(sec_midn()),60).eq.0) go to 2
call sleep_msec(100)
go to 1
endif
2 fname="all.tf2"//char(0)
userx_no=0
iusb=1
center_freq=144.125d0
@ -50,10 +57,9 @@ program plrs
do iter=1,iters
fd=open(fname,RMODE) !Open file for reading
dmsec=-dtmspacket
nsec0=time()
nsec0=sec_midn()
do ifile=1,nfiles
print*,'Reading file',ifile
ns0=0
tmsec=1000*(3600*7 + 60*nm(ifile))-dtmspacket
nr=read(fd,d,NBYTES)
@ -77,14 +83,14 @@ program plrs
npkt=npkt+1
if(mod(npkt,100).eq.0) then
nsec=time()-nsec0
nsec=int(sec_midn())-nsec0
nwait=msec-1000*nsec
! Pace the data at close to its real-time rate
if(nwait.gt.0 .and. .not.fast) call usleep(nwait*1000)
endif
ns=mod(msec2/1000,60)
if(ns.ne.ns0) write(*,1010) npkt,ns,0.001*msec2,nwait
1010 format('npkt:',i10,' ns:',i6,' t:',f10.3,' nwait:',i8)
if(ns.ne.ns0) write(*,1010) ns,center_freq,0.001*msec2,sec_midn()
1010 format('ns:',i3,' f0:',f10.3,' t1:',f10.3,' t2:',f10.3)
ns0=ns
enddo
if(pause) then