Clean up some code in jt4_decode.f90.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6677 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-05-16 17:50:16 +00:00
parent 081d08e38d
commit b69a5d5b58

View File

@ -108,11 +108,9 @@ contains
subroutine wsjt4(this,dat,npts,nutc,NClearAve,minsync,ntol,emedelay,dttol, &
mode4,minw,mycall,hiscall,hisgrid,nfqso,NAgain,ndepth,neme)
! Orchestrates the process of decoding JT4 messages, using data that
! have been 2x downsampled.
! NB: JT4 presently looks for only one decodable signal in the FTol
! range -- analogous to the nqd=1 step in JT9 and JT65.
! Orchestrates the process of decoding JT4 messages. Note that JT4
! always operates as if in "Single Decode" mode; it looks for only one
! decodable signal in the FTol range.
use jt4
use timer_module, only: timer
@ -180,6 +178,8 @@ contains
call timer('zplt ',1)
! Use results from zplt
!### NB: JT4 is severely "sync limited" at present...
flip=flipz
sync=syncz
snrx=db(sync) - 26.
@ -216,7 +216,7 @@ contains
call timer('decode4 ',1)
if(nfano.gt.0) then
! Fano succeeded: report the message and return FANO OK
! Fano succeeded: report the message and return !Fano OK
if (associated (this%decode_callback)) then
call this%decode_callback(nsnr,dtx,nfreq,.true.,csync, &
.false.,decoded,0.,ich,.false.,0)
@ -224,7 +224,7 @@ contains
nsave=0
go to 990
else ! NO FANO
else !Fano failed
if(qual.gt.qbest) then
dtx0=dtx
nfreq0=nfreq
@ -240,7 +240,7 @@ contains
! If this is a new minute or a new frequency, call avg4
if(.not. prtavg) then
if(nutc.ne.nutc0 .or. abs(nfreq-nfreq0).gt.ntol) then
nutc0=nutc ! TRY AVG
nutc0=nutc !Try decoding average
nfreq0=nfreq
nsave=nsave+1
nsave=mod(nsave-1,64)+1
@ -370,7 +370,6 @@ contains
fave=float(nfsum)/nsum
endif
! rewind 80
do i=1,nsave
csync='*'
if(flipsave(i).lt.0.0) csync='#'
@ -378,8 +377,6 @@ contains
call this%average_callback(cused(i) .eq. '$',iutc(i), &
syncsave(i) - 5.,dtsave(i),nfsave(i),flipsave(i) .lt.0.)
end if
! write(14,1000) cused(i),iutc(i),syncsave(i)-5.0,dtsave(i),nfsave(i),csync
!1000 format(a1,i5.4,f6.1,f6.2,i6,1x,a1)
enddo
sqt=0.
@ -389,8 +386,6 @@ contains
if(i.eq.0) exit
csync='*'
if(flipsave(i).lt.0.0) csync='#'
! write(80,3001) i,iutc(i),syncsave(i),dtsave(i),nfsave(i),csync
!3001 format(i3,i6.4,f6.1,f6.2,i6,1x,a1)
sqt=sqt + (dtsave(i)-dtave)**2
sqf=sqf + (nfsave(i)-fave)**2
enddo
@ -400,14 +395,6 @@ contains
rmst=sqrt(sqt/(nsum-1))
rmsf=sqrt(sqf/(nsum-1))
endif
! write(80,3002)
!3002 format(16x,'----- -----')
! write(80,3003) dtave,nint(fave)
! write(80,3003) rmst,nint(rmsf)
!3003 format(15x,f6.2,i6)
! flush(80)
! nadd=nused*mode4
kbest=ich1
do k=ich1,ich2
call extract4(sym(1,k),ncount,avemsg) !Do the Fano decode
@ -430,8 +417,6 @@ contains
qbest=0.
do k=ich1,ich2
call deep4(sym(2,k),neme,flipx,mycall,hiscall,hisgrid,deepave,qave)
! write(82,3101) nutc,sym(51:53,k),flipx,k,qave,deepave
!3101 format(i4.4,4f8.1,i3,f7.2,2x,a22)
if(qave.gt.qbest) then
qbest=qave
deepbest=deepave