mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-03 22:52:25 -04:00
Compute nhsym only once, in decode0().
This commit is contained in:
parent
b0b3ba438b
commit
feb267e7cf
@ -16,8 +16,15 @@ subroutine decode0(dd,ss,savg,nstandalone)
|
|||||||
save
|
save
|
||||||
|
|
||||||
call timer('decode0 ',0)
|
call timer('decode0 ',0)
|
||||||
|
nhsym=302
|
||||||
if(newdat.ne.0) then
|
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
|
hist=0
|
||||||
do i=1,nz
|
do i=1,nz
|
||||||
j1=min(abs(dd(1,i)),32768.0)
|
j1=min(abs(dd(1,i)),32768.0)
|
||||||
@ -36,7 +43,6 @@ subroutine decode0(dd,ss,savg,nstandalone)
|
|||||||
enddo
|
enddo
|
||||||
10 rmsdd=1.5*i
|
10 rmsdd=1.5*i
|
||||||
endif
|
endif
|
||||||
nhsym=279
|
|
||||||
ndphi=0
|
ndphi=0
|
||||||
if(iand(nrxlog,8).ne.0) ndphi=1
|
if(iand(nrxlog,8).ne.0) ndphi=1
|
||||||
|
|
||||||
|
@ -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
|
nts_q65=2**(mode_q65-1) !Q65 tone separation factor
|
||||||
if(nagain.eq.0) then
|
if(nagain.eq.0) then
|
||||||
call timer('get_cand',0)
|
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)
|
call timer('get_cand',1)
|
||||||
candec=.false.
|
candec=.false.
|
||||||
endif
|
endif
|
||||||
|
@ -26,7 +26,7 @@ module wideband_sync
|
|||||||
|
|
||||||
contains
|
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
|
! 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
|
! 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
|
logical xpol,skip
|
||||||
type(candidate) :: cand(MAX_CANDIDATES)
|
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)
|
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
|
tstep=2048.0/11025.0 !0.185760 s: 0.5*tsym_jt65, 0.3096*tsym_q65
|
||||||
|
Loading…
x
Reference in New Issue
Block a user