mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
Improve sync at large DT.
This commit is contained in:
parent
0d1b438b91
commit
0668c4fce0
@ -13,7 +13,7 @@ subroutine gen_ft4wave(itone,nsym,nsps,fsample,f0,cwave,wave,icmplx,nwave)
|
||||
twopi=8.0*atan(1.0)
|
||||
dt=1.0/fsample
|
||||
hmod=1.0
|
||||
! Compute the frequency-smoothing pulse
|
||||
! Compute the smoothed frequency-deviation pulse
|
||||
do i=1,3*nsps
|
||||
tt=(i-1.5*nsps)/real(nsps)
|
||||
pulse(i)=gfsk_pulse(1.0,tt)
|
||||
|
@ -60,7 +60,16 @@ subroutine sync4d(cd0,i0,ctwk,itwk,sync)
|
||||
z4=0.
|
||||
|
||||
if(itwk.eq.1) csync2=ctwk*csynca !Tweak the frequency
|
||||
if(i1.ge.0 .and. i1+4*NSS-1.le.NP-1) z1=sum(cd0(i1:i1+4*NSS-1:2)*conjg(csync2))
|
||||
if(i1.ge.0 .and. i1+4*NSS-1.le.NP-1) then
|
||||
z1=sum(cd0(i1:i1+4*NSS-1:2)*conjg(csync2))
|
||||
elseif( i1.lt.0 ) then
|
||||
npts=(i1+4*NSS-1)/2
|
||||
if(npts.le.8) then
|
||||
z1=0.
|
||||
else
|
||||
z1=sum(cd0(0:i1+4*NSS-1:2)*conjg(csync2(2*NSS-npts:)))
|
||||
endif
|
||||
endif
|
||||
|
||||
if(itwk.eq.1) csync2=ctwk*csyncb !Tweak the frequency
|
||||
if(i2.ge.0 .and. i2+4*NSS-1.le.NP-1) z2=sum(cd0(i2:i2+4*NSS-1:2)*conjg(csync2))
|
||||
@ -69,8 +78,16 @@ subroutine sync4d(cd0,i0,ctwk,itwk,sync)
|
||||
if(i3.ge.0 .and. i3+4*NSS-1.le.NP-1) z3=sum(cd0(i3:i3+4*NSS-1:2)*conjg(csync2))
|
||||
|
||||
if(itwk.eq.1) csync2=ctwk*csyncd !Tweak the frequency
|
||||
if(i4.ge.0 .and. i4+4*NSS-1.le.NP-1) z4=sum(cd0(i4:i4+4*NSS-1:2)*conjg(csync2))
|
||||
|
||||
if(i4.ge.0 .and. i4+4*NSS-1.le.NP-1) then
|
||||
z4=sum(cd0(i4:i4+4*NSS-1:2)*conjg(csync2))
|
||||
elseif( i4+4*NSS-1.gt.NP-1 ) then
|
||||
npts=(NP-1-i4+1)/2
|
||||
if(npts.le.8) then
|
||||
z4=0.
|
||||
else
|
||||
z4=sum(cd0(i4:i4+2*npts-1:2)*conjg(csync2(1:npts)))
|
||||
endif
|
||||
endif
|
||||
sync = p(z1) + p(z2) + p(z3) + p(z4)
|
||||
|
||||
return
|
||||
|
@ -262,8 +262,8 @@ contains
|
||||
idfmin=idfbest-4
|
||||
idfmax=idfbest+4
|
||||
idfstp=1
|
||||
ibmin=max(0,ibest-5)
|
||||
ibmax=min(ibest+5,NDMAX-1)
|
||||
ibmin=ibest-5
|
||||
ibmax=ibest+5
|
||||
ibstp=1
|
||||
endif
|
||||
ibest=-1
|
||||
|
Loading…
Reference in New Issue
Block a user