Code cleanup.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8228 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-11-09 21:15:37 +00:00
parent b73d88c514
commit 18f3936271
2 changed files with 22 additions and 16 deletions

View File

@ -30,12 +30,10 @@ subroutine fox_rx(fail,called,fm,hm)
ib=index(fm,';')
ic=index(fm,trim(called))
id=index(fm,'RR73;')
! print*,'rx a0 ',fm,' ',called,' ',cx,ia,ib,ic,id
if((ia.eq.1 .or. ic.eq.ib+2) .and. id.ge.4) then
i1=index(fm,';')+2
i2=index(fm,'<')-2
cx=fm(i1:i2)
! print*,'rx a2 ',fm,' ',called,' ',cx
write(hm,1004) MyCall,cx,isnrx
1004 format(a6,1x,a6,' R',i3.2)
if(hm(16:16).eq.' ') hm(16:16)='+'

View File

@ -1,7 +1,6 @@
program fox_sim
! Simulates QSO exchanges using the proposed FT8 "DXpedition" mode.
parameter (MAXSIG=5,NCALLS=268)
character*6 xcall(NCALLS)
character*4 xgrid(NCALLS)
@ -22,7 +21,12 @@ program fox_sim
nargs=iargc()
if(nargs.ne.2 .and. nargs.ne.4) then
print*,'Usage: fox_sim nseq maxtimes'
print*,' fox_sim nseq maxtimes nsig fail'
print*,' fox_sim nseq maxtimes nsig fail'
print*,' '
print*,' nseq: number of T/R sequences to execute'
print*,' maxtimes: number of repeats of same Tx message'
print*,' nsig: number of simultaneous Tx sigals'
print*,' fail: receiving error rate'
go to 999
endif
ii1=1
@ -58,6 +62,7 @@ program fox_sim
enddo
close(10)
! Write headings for the summary file
minutes=nseq/4
write(13,1002) nseq,minutes,maxtimes
1002 format(/'Nseq:',i4,' Minutes:',i3,' Maxtimes:',i2// &
@ -70,9 +75,9 @@ program fox_sim
MyCall='KH1DX'
MyGrid='AJ10'
do jj=jj1,jj2
do jj=jj1,jj2 !Loop over Rx failure rates
fail=0.1*jj
do ii=ii1,ii2
do ii=ii1,ii2 !Loop over range of nsig
nc=0 !Set FIFO pointer to top
ntimes=1
nsig=ii
@ -80,37 +85,40 @@ program fox_sim
fmsg="CQ KH1DX AJ10"
hmsg=""
called=" "
do iseq=0,nseq
do iseq=0,nseq !Loop over specified number of sequences
if(iand(iseq,1).eq.0) then
do j=1,nsig
do j=1,nsig !Loop over Fox's Tx slots
fm=fmsg(j)
hm=hmsg(j)
! Call fox_tx to determine the next Tx message for this slot
call fox_tx(maxtimes,fail,called(j),gcalled(j),hm,fm, &
ntimes(j),log,logit)
fmsg(j)=fm
if(logit) then
! Log this QSO
nlogged=nlogged+1
nrate=0
if(iseq.gt.0) nrate=nint(nlogged*240.0/iseq)
write(*,1010) iseq,j,ntimes(j),fmsg(j),log,nlogged,nrate
1010 format(i4.4,2i2,1x,a32,20x,a16,2i4)
! call log_routine()
else
write(*,1010) iseq,j,ntimes(j),fmsg(j)
! write(fmsg(j),1004) cx(j),mycall,irpt(j)
! write(*,1010) iseq,j,istate(1:2,j),fmsg(j)
endif
! if(fm(1:3).eq.'2E0') print*,'tx a0',j,fm,called(j)
enddo
! call transmit
! call transmit()
endif
if(iand(iseq,1).eq.1) then
do j=1,nsig
do j=1,nsig !Listen for expected responses
fm=fmsg(j)
! print*,'AA ',j,fm,called(j)
call fox_rx(fail,called(j),fm,hm)
if(j.ge.2) then
if(hm.eq.hmsg(j-1)) hm=""
endif
hmsg(j)=hm
! print*,'BB ',j,fm,called(j),' ',hm
write(*,1020) iseq,j,hmsg(j)
1020 format(i4.4,i2,37x,a22)
enddo
@ -120,7 +128,7 @@ program fox_sim
irate(ii)=0
if(iseq.gt.0) irate(ii)=nint(nlogged*3600.0/(15*iseq))
write(*,1030) nsig,fail,nlogged,nc
1030 format('Nsig:',i3,' Fail:',f4.1,' Logged QSOs:',i4, &
1030 format(/'Nsig:',i3,' Fail:',f4.1,' Logged QSOs:',i4, &
' Final nc:',i4)
enddo
write(13,1100) fail,ntot,irate