mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-01 01:26:39 -04:00
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:
parent
b73d88c514
commit
18f3936271
@ -30,12 +30,10 @@ subroutine fox_rx(fail,called,fm,hm)
|
|||||||
ib=index(fm,';')
|
ib=index(fm,';')
|
||||||
ic=index(fm,trim(called))
|
ic=index(fm,trim(called))
|
||||||
id=index(fm,'RR73;')
|
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
|
if((ia.eq.1 .or. ic.eq.ib+2) .and. id.ge.4) then
|
||||||
i1=index(fm,';')+2
|
i1=index(fm,';')+2
|
||||||
i2=index(fm,'<')-2
|
i2=index(fm,'<')-2
|
||||||
cx=fm(i1:i2)
|
cx=fm(i1:i2)
|
||||||
! print*,'rx a2 ',fm,' ',called,' ',cx
|
|
||||||
write(hm,1004) MyCall,cx,isnrx
|
write(hm,1004) MyCall,cx,isnrx
|
||||||
1004 format(a6,1x,a6,' R',i3.2)
|
1004 format(a6,1x,a6,' R',i3.2)
|
||||||
if(hm(16:16).eq.' ') hm(16:16)='+'
|
if(hm(16:16).eq.' ') hm(16:16)='+'
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
program fox_sim
|
program fox_sim
|
||||||
|
|
||||||
! Simulates QSO exchanges using the proposed FT8 "DXpedition" mode.
|
! Simulates QSO exchanges using the proposed FT8 "DXpedition" mode.
|
||||||
|
|
||||||
parameter (MAXSIG=5,NCALLS=268)
|
parameter (MAXSIG=5,NCALLS=268)
|
||||||
character*6 xcall(NCALLS)
|
character*6 xcall(NCALLS)
|
||||||
character*4 xgrid(NCALLS)
|
character*4 xgrid(NCALLS)
|
||||||
@ -23,6 +22,11 @@ program fox_sim
|
|||||||
if(nargs.ne.2 .and. nargs.ne.4) then
|
if(nargs.ne.2 .and. nargs.ne.4) then
|
||||||
print*,'Usage: fox_sim nseq maxtimes'
|
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
|
go to 999
|
||||||
endif
|
endif
|
||||||
ii1=1
|
ii1=1
|
||||||
@ -58,6 +62,7 @@ program fox_sim
|
|||||||
enddo
|
enddo
|
||||||
close(10)
|
close(10)
|
||||||
|
|
||||||
|
! Write headings for the summary file
|
||||||
minutes=nseq/4
|
minutes=nseq/4
|
||||||
write(13,1002) nseq,minutes,maxtimes
|
write(13,1002) nseq,minutes,maxtimes
|
||||||
1002 format(/'Nseq:',i4,' Minutes:',i3,' Maxtimes:',i2// &
|
1002 format(/'Nseq:',i4,' Minutes:',i3,' Maxtimes:',i2// &
|
||||||
@ -70,9 +75,9 @@ program fox_sim
|
|||||||
MyCall='KH1DX'
|
MyCall='KH1DX'
|
||||||
MyGrid='AJ10'
|
MyGrid='AJ10'
|
||||||
|
|
||||||
do jj=jj1,jj2
|
do jj=jj1,jj2 !Loop over Rx failure rates
|
||||||
fail=0.1*jj
|
fail=0.1*jj
|
||||||
do ii=ii1,ii2
|
do ii=ii1,ii2 !Loop over range of nsig
|
||||||
nc=0 !Set FIFO pointer to top
|
nc=0 !Set FIFO pointer to top
|
||||||
ntimes=1
|
ntimes=1
|
||||||
nsig=ii
|
nsig=ii
|
||||||
@ -80,37 +85,40 @@ program fox_sim
|
|||||||
fmsg="CQ KH1DX AJ10"
|
fmsg="CQ KH1DX AJ10"
|
||||||
hmsg=""
|
hmsg=""
|
||||||
called=" "
|
called=" "
|
||||||
do iseq=0,nseq
|
do iseq=0,nseq !Loop over specified number of sequences
|
||||||
if(iand(iseq,1).eq.0) then
|
if(iand(iseq,1).eq.0) then
|
||||||
do j=1,nsig
|
do j=1,nsig !Loop over Fox's Tx slots
|
||||||
fm=fmsg(j)
|
fm=fmsg(j)
|
||||||
hm=hmsg(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, &
|
call fox_tx(maxtimes,fail,called(j),gcalled(j),hm,fm, &
|
||||||
ntimes(j),log,logit)
|
ntimes(j),log,logit)
|
||||||
|
|
||||||
fmsg(j)=fm
|
fmsg(j)=fm
|
||||||
if(logit) then
|
if(logit) then
|
||||||
|
! Log this QSO
|
||||||
nlogged=nlogged+1
|
nlogged=nlogged+1
|
||||||
nrate=0
|
nrate=0
|
||||||
if(iseq.gt.0) nrate=nint(nlogged*240.0/iseq)
|
if(iseq.gt.0) nrate=nint(nlogged*240.0/iseq)
|
||||||
write(*,1010) iseq,j,ntimes(j),fmsg(j),log,nlogged,nrate
|
write(*,1010) iseq,j,ntimes(j),fmsg(j),log,nlogged,nrate
|
||||||
1010 format(i4.4,2i2,1x,a32,20x,a16,2i4)
|
1010 format(i4.4,2i2,1x,a32,20x,a16,2i4)
|
||||||
|
! call log_routine()
|
||||||
else
|
else
|
||||||
write(*,1010) iseq,j,ntimes(j),fmsg(j)
|
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
|
endif
|
||||||
! if(fm(1:3).eq.'2E0') print*,'tx a0',j,fm,called(j)
|
|
||||||
enddo
|
enddo
|
||||||
! call transmit
|
! call transmit()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if(iand(iseq,1).eq.1) then
|
if(iand(iseq,1).eq.1) then
|
||||||
do j=1,nsig
|
do j=1,nsig !Listen for expected responses
|
||||||
fm=fmsg(j)
|
fm=fmsg(j)
|
||||||
! print*,'AA ',j,fm,called(j)
|
|
||||||
call fox_rx(fail,called(j),fm,hm)
|
call fox_rx(fail,called(j),fm,hm)
|
||||||
|
if(j.ge.2) then
|
||||||
|
if(hm.eq.hmsg(j-1)) hm=""
|
||||||
|
endif
|
||||||
hmsg(j)=hm
|
hmsg(j)=hm
|
||||||
! print*,'BB ',j,fm,called(j),' ',hm
|
|
||||||
write(*,1020) iseq,j,hmsg(j)
|
write(*,1020) iseq,j,hmsg(j)
|
||||||
1020 format(i4.4,i2,37x,a22)
|
1020 format(i4.4,i2,37x,a22)
|
||||||
enddo
|
enddo
|
||||||
@ -120,7 +128,7 @@ program fox_sim
|
|||||||
irate(ii)=0
|
irate(ii)=0
|
||||||
if(iseq.gt.0) irate(ii)=nint(nlogged*3600.0/(15*iseq))
|
if(iseq.gt.0) irate(ii)=nint(nlogged*3600.0/(15*iseq))
|
||||||
write(*,1030) nsig,fail,nlogged,nc
|
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)
|
' Final nc:',i4)
|
||||||
enddo
|
enddo
|
||||||
write(13,1100) fail,ntot,irate
|
write(13,1100) fail,ntot,irate
|
||||||
|
Loading…
Reference in New Issue
Block a user