Further improvements to JT9 decoder.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4993 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2015-02-27 15:38:24 +00:00
parent 2474f73b7b
commit 476c0683a8
6 changed files with 19 additions and 26 deletions

View File

@ -6,9 +6,9 @@ subroutine afc9(c3,npts,fsample,a,syncpk)
a(1)=0. !f0 a(1)=0. !f0
a(2)=0. !f1 a(2)=0. !f1
a(3)=0. !f2 a(3)=0. !f2
deltaa(1)=0.2 deltaa(1)=0.4
deltaa(2)=0.01 deltaa(2)=0.1
deltaa(3)=0.01 deltaa(3)=0.1
nterms=3 nterms=3
! Start the iteration ! Start the iteration
@ -42,17 +42,17 @@ subroutine afc9(c3,npts,fsample,a,syncpk)
delta=delta*(1./(1.+(chisq1-chisq2)/(chisq3-chisq2))+0.5) delta=delta*(1./(1.+(chisq1-chisq2)/(chisq3-chisq2))+0.5)
a(j)=a(j)-delta a(j)=a(j)-delta
deltaa(j)=deltaa(j)*fn/3. deltaa(j)=deltaa(j)*fn/3.
! write(*,4000) iter,j,a,deltaa,-chisq2 ! write(*,4000) iter,j,a,-chisq2
!4000 format(i1,i2,6f10.4,f9.3) !4000 format(i1,i2,3f10.4,f11.3)
enddo enddo
chisqr=fchisq(c3,npts,fsample,a) chisqr=fchisq(c3,npts,fsample,a)
if(chisqr/chisqr0.gt.0.9999) exit if(chisqr/chisqr0.gt.0.99) exit
chisqr0=chisqr chisqr0=chisqr
enddo enddo
syncpk=-chisqr syncpk=-chisqr
! write(*,4001) a,deltaa,-chisq2 ! write(*,4001) a,-chisq2
!4001 format(3x,6f10.4,f9.3) !4001 format(3x,3f10.4,f11.3)
return return
end subroutine afc9 end subroutine afc9

View File

@ -2,22 +2,18 @@ subroutine chkss2(ss2,freq,drift,schk)
real ss2(0:8,85) real ss2(0:8,85)
real s(0:8,85) real s(0:8,85)
real s1(0:5)
include 'jt9sync.f90' include 'jt9sync.f90'
ave=sum(ss2)/(9*85) ave=sum(ss2)/(9*85)
if(freq+drift.eq.-999999.0) ave=0. !To silence compiler warning if(freq+drift.eq.-999999.0) ave=0. !To silence compiler warning
s=ss2/ave-1.0 s=ss2/ave-1.0
! call zplot9(s,freq,drift)
s1=0. s1=0.
do lag=0,5 do i=1,16
do i=1,16 j=ii(i)
j=ii(i)+lag if(j.le.85) s1=s1 + s(0,j)
if(j.le.85) s1(lag)=s1(lag) + s(0,j)
enddo
enddo enddo
schk=s1(0)/16.0 schk=s1/16.0
return return
end subroutine chkss2 end subroutine chkss2

View File

@ -94,9 +94,10 @@ subroutine decjt9(ss,id2,nutc,nfqso,newdat,npts8,nfa,nfsplit,nfb,ntol, &
call timer('softsym ',1) call timer('softsym ',1)
sync=(syncpk+1)/4.0 sync=(syncpk+1)/4.0
if(maxval(i1SoftSymbols).eq.0) cycle ! if(maxval(i1SoftSymbols).eq.0) cycle
if(nqd.eq.1 .and. ((sync.lt.0.5) .or. (schk.lt.2.0))) cycle ! if(nqd.eq.1 .and. ((sync.lt.0.5) .or. (schk.lt.1.0))) cycle
if(nqd.ne.1 .and. ((sync.lt.1.0) .or. (schk.lt.schklim))) cycle ! if(nqd.ne.1 .and. ((sync.lt.1.0) .or. (schk.lt.1.5))) cycle
if(nqd.ne.1 .and. ((sync.lt.1.0) .or. (schk.lt.1.8))) cycle
call timer('jt9fano ',0) call timer('jt9fano ',0)
call jt9fano(i1SoftSymbols,limit,nlim,msg) call jt9fano(i1SoftSymbols,limit,nlim,msg)

View File

@ -34,7 +34,7 @@ real function fchisq(c3,npts,fsample,a)
sum0=sum0+pp sum0=sum0+pp
endif endif
enddo enddo
sync=(sum1/16.0)/(sum0/69.0) - 1.0 sync=sum1/10000.0
fchisq=-sync fchisq=-sync
return return

View File

@ -69,7 +69,7 @@ subroutine jt9fano(i1SoftSymbols,limit,nlim,msg)
ncycles,metric,ierr) ncycles,metric,ierr)
nlim=ncycles/(nbits+31) nlim=ncycles/(nbits+31)
if(ncycles.lt.(nbits*limit)) then if(ncycles.lt.((nbits+31)*limit)) then
nbytes=(nbits+7)/8 nbytes=(nbits+7)/8
do i=1,nbytes do i=1,nbytes
n=i1DecodedBytes(i) n=i1DecodedBytes(i)

View File

@ -34,10 +34,6 @@ subroutine symspec2(c5,nz3,nsps8,nspsd,fsample,freq,drift,snrdb,schk, &
enddo enddo
call chkss2(ss2,freq,drift,schk) call chkss2(ss2,freq,drift,schk)
if(schk.lt.1.8) then
i1SoftSymbolsScrambled=0
go to 900
endif
ss=0. ss=0.
sig=0. sig=0.
@ -87,5 +83,5 @@ subroutine symspec2(c5,nz3,nsps8,nspsd,fsample,freq,drift,snrdb,schk, &
enddo enddo
enddo enddo
900 return return
end subroutine symspec2 end subroutine symspec2