Back to original logic for decoding JT65A at HF, when "Single decode"

is not checked.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6538 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-03-18 23:29:10 +00:00
parent 767a9452e6
commit 5afa11653a
2 changed files with 24 additions and 29 deletions

View File

@ -143,14 +143,16 @@ contains
ncand=0 ncand=0
if(.not.robust) then if(.not.robust) then
call timer('sync65 ',0) call timer('sync65 ',0)
call sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,0) call sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,0, &
single_decode)
call timer('sync65 ',1) call timer('sync65 ',1)
endif endif
if(ncand.gt.50) robust=.true. if(ncand.gt.50) robust=.true.
if(robust) then if(robust) then
ncand=0 ncand=0
call timer('sync65 ',0) call timer('sync65 ',0)
call sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,1) call sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,1, &
single_decode)
call timer('sync65 ',1) call timer('sync65 ',1)
endif endif
@ -201,10 +203,10 @@ contains
nfreq=nint(freq+a(1)) nfreq=nint(freq+a(1))
ndrift=nint(2.0*a(2)) ndrift=nint(2.0*a(2))
! s2db=10.0*log10(sync2) - 35 !### empirical ### !###
! if(width.gt.3) s2db=s2db + 2.1*sqrt(width-3.0) + 1.5 + & ! s2db=10.0*log10(sync2) - 35 !### empirical (HF)
! 0.11*(width-7.0) !### empirical^2 ### s2db=sync1 - 30.0 + db(width/3.3) !### VHF/UHF/microwave
s2db=sync1 - 30.0 + db(width/3.3) !###
nsnr=nint(s2db) nsnr=nint(s2db)
if(nsnr.lt.-30) nsnr=-30 if(nsnr.lt.-30) nsnr=-30
if(nsnr.gt.-1) nsnr=-1 if(nsnr.gt.-1) nsnr=-1

View File

@ -1,9 +1,11 @@
subroutine sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,nrobust) subroutine sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,nrobust, &
single_decode)
parameter (NSZ=3413,NFFT=8192,MAXCAND=300) parameter (NSZ=3413,NFFT=8192,MAXCAND=300)
real ss(322,NSZ) real ss(322,NSZ)
real ccfblue(-11:540) !CCF with pseudorandom sequence real ccfblue(-11:540) !CCF with pseudorandom sequence
real ccfred(NSZ) !Peak of ccfblue, as function of freq real ccfred(NSZ) !Peak of ccfblue, as function of freq
logical single_decode
type candidate type candidate
real freq real freq
@ -31,7 +33,8 @@ subroutine sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,nrobust)
do i=ia,ib do i=ia,ib
call xcor(ss,i,nhsym,nsym,lag1,lag2,ccfblue,ccf0,lagpk0,flip,fdot,nrobust) call xcor(ss,i,nhsym,nsym,lag1,lag2,ccfblue,ccf0,lagpk0,flip,fdot,nrobust)
! Remove best-fit slope from ccfblue and normalize so baseline rms=1.0 ! Remove best-fit slope from ccfblue and normalize so baseline rms=1.0
! call slope(ccfblue(lag1),lag2-lag1+1,lagpk0-lag1+1.0) if(.not.single_decode) call slope(ccfblue(lag1),lag2-lag1+1, &
lagpk0-lag1+1.0)
ccfred(i)=ccfblue(lagpk0) ccfred(i)=ccfblue(lagpk0)
if(ccfred(i).gt.ccfmax) then if(ccfred(i).gt.ccfmax) then
ccfmax=ccfred(i) ccfmax=ccfred(i)
@ -43,12 +46,6 @@ subroutine sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,nrobust)
ccfred(ia-1)=ccfred(ia) ccfred(ia-1)=ccfred(ia)
ccfred(ib+1)=ccfred(ib) ccfred(ib+1)=ccfred(ib)
! do i=1,NSZ
! ssum=sum(ss(1:322,i))/322.0
! write(61,3001) i*df,ccfred(i),ssum
! enddo
do i=ia,ib do i=ia,ib
freq=i*df freq=i*df
itry=0 itry=0
@ -64,8 +61,10 @@ subroutine sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,nrobust)
endif endif
endif endif
if(itry.ne.0) then if(itry.ne.0) then
call xcor(ss,i,nhsym,nsym,lag1,lag2,ccfblue,ccf0,lagpk,flip,fdot,nrobust) call xcor(ss,i,nhsym,nsym,lag1,lag2,ccfblue,ccf0,lagpk,flip,fdot, &
! call slope(ccfblue(lag1),lag2-lag1+1,lagpk-lag1+1.0) nrobust)
if(.not.single_decode) call slope(ccfblue(lag1),lag2-lag1+1, &
lagpk-lag1+1.0)
xlag=lagpk xlag=lagpk
if(lagpk.gt.lag1 .and. lagpk.lt.lag2) then if(lagpk.gt.lag1 .and. lagpk.lt.lag2) then
call peakup(ccfblue(lagpk-1),ccfmax,ccfblue(lagpk+1),dx2) call peakup(ccfblue(lagpk-1),ccfmax,ccfblue(lagpk+1),dx2)
@ -76,20 +75,14 @@ subroutine sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,nrobust)
ccfblue(lag2)=0. ccfblue(lag2)=0.
ca(ncand)%freq=freq ca(ncand)%freq=freq
ca(ncand)%dt=dtx ca(ncand)%dt=dtx
! ca(ncand)%sync=ccfred(i) if(single_decode) then
ca(ncand)%sync=db(ccfred(i)) - 16.0 ca(ncand)%sync=db(ccfred(i)) - 16.0
else
ca(ncand)%sync=ccfred(i)
endif
endif endif
if(ncand.eq.MAXCAND) return if(ncand.eq.MAXCAND) return
enddo enddo
! do i=1,NSZ
! write(52,3001) i*df,ccfred(i)
!3001 format(3f12.3)
! enddo
! do i=-10,58
! write(53,3002) i,i*2048.0/11025.0,ccfblue(i)
!3002 format(i6,2f12.3)
! enddo
return return
end subroutine sync65 end subroutine sync65