Compute nhsym only once, in decode0().

This commit is contained in:
Joe Taylor 2021-07-07 14:11:34 -04:00
parent b0b3ba438b
commit feb267e7cf
3 changed files with 10 additions and 8 deletions

View File

@ -16,8 +16,15 @@ subroutine decode0(dd,ss,savg,nstandalone)
save
call timer('decode0 ',0)
nhsym=302
if(newdat.ne.0) then
nz=52*96000
istep=10000
do i=NSMAX,1,-istep
n=maxval(abs(dd(1,i-istep+1:i)))
if(n.gt.10) exit
enddo
nz=i
nhsym=5.3833*nz/96000.0
hist=0
do i=1,nz
j1=min(abs(dd(1,i)),32768.0)
@ -36,7 +43,6 @@ subroutine decode0(dd,ss,savg,nstandalone)
enddo
10 rmsdd=1.5*i
endif
nhsym=279
ndphi=0
if(iand(nrxlog,8).ne.0) ndphi=1

View File

@ -51,7 +51,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
nts_q65=2**(mode_q65-1) !Q65 tone separation factor
if(nagain.eq.0) then
call timer('get_cand',0)
call get_candidates(ss,savg,xpol,mfa,mfb,nts_jt65,nts_q65,cand,ncand)
call get_candidates(ss,savg,xpol,nhsym,mfa,mfb,nts_jt65,nts_q65,cand,ncand)
call timer('get_cand',1)
candec=.false.
endif

View File

@ -26,7 +26,7 @@ module wideband_sync
contains
subroutine get_candidates(ss,savg,xpol,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
subroutine get_candidates(ss,savg,xpol,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
! Search symbol spectra ss() over frequency range nfa to nfb (in kHz) for
! JT65 and Q65 sync patterns. The nts_* variables are the submode tone
@ -40,10 +40,6 @@ subroutine get_candidates(ss,savg,xpol,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
logical xpol,skip
type(candidate) :: cand(MAX_CANDIDATES)
do j=322,1,-1 !Find end of data in ss()
if(sum(ss(1,j,1:NFFT)).gt.0.0) exit
enddo
jz=j
call wb_sync(ss,savg,xpol,jz,nfa,nfb)
tstep=2048.0/11025.0 !0.185760 s: 0.5*tsym_jt65, 0.3096*tsym_q65