mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-17 09:05:19 -04:00
FT4: Improve sync performance on disturbed channels. Make jt9 command-line option -d work
This commit is contained in:
parent
fc07bd9287
commit
7e9cc9cbc7
@ -9,7 +9,6 @@ subroutine sync4d(cd0,i0,ctwk,itwk,sync)
|
|||||||
complex csync2(2*NSS)
|
complex csync2(2*NSS)
|
||||||
complex ctwk(2*NSS)
|
complex ctwk(2*NSS)
|
||||||
complex z1,z2,z3,z4
|
complex z1,z2,z3,z4
|
||||||
complex zz1,zz2,zz3,zz4
|
|
||||||
logical first
|
logical first
|
||||||
integer icos4a(0:3),icos4b(0:3),icos4c(0:3),icos4d(0:3)
|
integer icos4a(0:3),icos4b(0:3),icos4c(0:3),icos4d(0:3)
|
||||||
data icos4a/0,1,3,2/
|
data icos4a/0,1,3,2/
|
||||||
@ -19,7 +18,7 @@ subroutine sync4d(cd0,i0,ctwk,itwk,sync)
|
|||||||
data first/.true./
|
data first/.true./
|
||||||
save first,twopi,csynca,csyncb,csyncc,csyncd,fac
|
save first,twopi,csynca,csyncb,csyncc,csyncd,fac
|
||||||
|
|
||||||
p(z1)=real(z1*fac)**2 + aimag(z1*fac)**2 !Statement function for power
|
p(z1)=sqrt(real(z1*fac)**2 + aimag(z1*fac)**2) !Statement function for power
|
||||||
|
|
||||||
if( first ) then
|
if( first ) then
|
||||||
twopi=8.0*atan(1.0)
|
twopi=8.0*atan(1.0)
|
||||||
@ -60,11 +59,12 @@ subroutine sync4d(cd0,i0,ctwk,itwk,sync)
|
|||||||
z4=0.
|
z4=0.
|
||||||
|
|
||||||
if(itwk.eq.1) csync2=ctwk*csynca !Tweak the frequency
|
if(itwk.eq.1) csync2=ctwk*csynca !Tweak the frequency
|
||||||
|
z1=0.
|
||||||
if(i1.ge.0 .and. i1+4*NSS-1.le.NP-1) then
|
if(i1.ge.0 .and. i1+4*NSS-1.le.NP-1) then
|
||||||
z1=sum(cd0(i1:i1+4*NSS-1:2)*conjg(csync2))
|
z1=sum(cd0(i1:i1+4*NSS-1:2)*conjg(csync2))
|
||||||
elseif( i1.lt.0 ) then
|
elseif( i1.lt.0 ) then
|
||||||
npts=(i1+4*NSS-1)/2
|
npts=(i1+4*NSS-1)/2
|
||||||
if(npts.le.8) then
|
if(npts.le.16) then
|
||||||
z1=0.
|
z1=0.
|
||||||
else
|
else
|
||||||
z1=sum(cd0(0:i1+4*NSS-1:2)*conjg(csync2(2*NSS-npts:)))
|
z1=sum(cd0(0:i1+4*NSS-1:2)*conjg(csync2(2*NSS-npts:)))
|
||||||
@ -78,16 +78,18 @@ 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(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(itwk.eq.1) csync2=ctwk*csyncd !Tweak the frequency
|
||||||
|
z4=0.
|
||||||
if(i4.ge.0 .and. i4+4*NSS-1.le.NP-1) then
|
if(i4.ge.0 .and. i4+4*NSS-1.le.NP-1) then
|
||||||
z4=sum(cd0(i4:i4+4*NSS-1:2)*conjg(csync2))
|
z4=sum(cd0(i4:i4+4*NSS-1:2)*conjg(csync2))
|
||||||
elseif( i4+4*NSS-1.gt.NP-1 ) then
|
elseif( i4+4*NSS-1.gt.NP-1 ) then
|
||||||
npts=(NP-1-i4+1)/2
|
npts=(NP-1-i4+1)/2
|
||||||
if(npts.le.8) then
|
if(npts.le.16) then
|
||||||
z4=0.
|
z4=0.
|
||||||
else
|
else
|
||||||
z4=sum(cd0(i4:i4+2*npts-1:2)*conjg(csync2(1:npts)))
|
z4=sum(cd0(i4:i4+2*npts-1:2)*conjg(csync2(1:npts)))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
sync = p(z1) + p(z2) + p(z3) + p(z4)
|
sync = p(z1) + p(z2) + p(z3) + p(z4)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -285,12 +285,10 @@ contains
|
|||||||
else
|
else
|
||||||
cd(-ibest:ibest+NN*NSS-1)=cb(0:NN*NSS+2*ibest-1)
|
cd(-ibest:ibest+NN*NSS-1)=cb(0:NN*NSS+2*ibest-1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call timer('bitmet ',0)
|
call timer('bitmet ',0)
|
||||||
call get_ft4_bitmetrics(cd,bitmetrics,badsync)
|
call get_ft4_bitmetrics(cd,bitmetrics,badsync)
|
||||||
call timer('bitmet ',1)
|
call timer('bitmet ',1)
|
||||||
if(badsync) cycle
|
if(badsync) cycle
|
||||||
|
|
||||||
hbits=0
|
hbits=0
|
||||||
where(bitmetrics(:,1).ge.0) hbits=1
|
where(bitmetrics(:,1).ge.0) hbits=1
|
||||||
ns1=count(hbits( 1: 8).eq.(/0,0,0,1,1,0,1,1/))
|
ns1=count(hbits( 1: 8).eq.(/0,0,0,1,1,0,1,1/))
|
||||||
@ -405,7 +403,7 @@ contains
|
|||||||
|
|
||||||
if(doosd .and. nharderror.lt.0) then
|
if(doosd .and. nharderror.lt.0) then
|
||||||
ndeep=3
|
ndeep=3
|
||||||
if(abs(nfqso-f1).le.napwid) then
|
if(abs(nfqso-f0).le.napwid) then
|
||||||
ndeep=4
|
ndeep=4
|
||||||
endif
|
endif
|
||||||
call timer('osd174_91 ',0)
|
call timer('osd174_91 ',0)
|
||||||
@ -439,7 +437,8 @@ contains
|
|||||||
endif
|
endif
|
||||||
nsnr=nint(max(-21.0,xsnr))
|
nsnr=nint(max(-21.0,xsnr))
|
||||||
xdt=ibest/666.67 - 0.5
|
xdt=ibest/666.67 - 0.5
|
||||||
!write(21,'(i6.6,i5,2x,f4.1,i6,2x,a37,2x,f4.1,3i3,f5.1)') nutc,nsnr,xdt,nint(f0),message,sync,iaptype,ipass,isp,dmin
|
!write(21,'(i6.6,i5,2x,f4.1,i6,2x,a37,2x,f4.1,3i3,f5.1,i4,i4)') &
|
||||||
|
! nutc,nsnr,xdt,nint(f0),message,sync,iaptype,ipass,isp,dmin,nsync_qual,nharderror
|
||||||
call this%callback(sync,nsnr,xdt,f0,message,iaptype,qual)
|
call this%callback(sync,nsnr,xdt,f0,message,iaptype,qual)
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
|
@ -179,7 +179,6 @@ program jt9
|
|||||||
go to 999
|
go to 999
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if(mode.eq.5) ndepth=3
|
|
||||||
allocate(shared_data)
|
allocate(shared_data)
|
||||||
nflatten=0
|
nflatten=0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user