diff options
| author | Christoph Berg <myon@debian.org> | 2022-12-04 22:15:32 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2022-12-04 22:15:32 +0100 |
| commit | fa73b3f50ec6ead52c3371a96f62bc6e666a9ee5 (patch) | |
| tree | 6971e745fdf2f4c6b81ded57e87d233840971d62 /lib/ft8 | |
| parent | 4d2fac0dafe835b1ed479bebe136c3afe748ecf3 (diff) | |
New upstream version 2.6.0~rc5+repackupstream/2.6.0_rc5+repack
Diffstat (limited to 'lib/ft8')
| -rwxr-xr-x | lib/ft8/ft8b.f90 | 8 | ||||
| -rwxr-xr-x | lib/ft8/sync8.f90 | 54 |
2 files changed, 44 insertions, 18 deletions
diff --git a/lib/ft8/ft8b.f90 b/lib/ft8/ft8b.f90 index 36ae1283..75b17adf 100755 --- a/lib/ft8/ft8b.f90 +++ b/lib/ft8/ft8b.f90 @@ -287,6 +287,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,nzhsym,lapon, & ! 5 : WW_DIGI
! 6 : FOX
! 7 : HOUND
+! 8 : ARRL_DIGI
!
! Conditions that cause us to bail out of AP decoding
if(ncontest.le.5 .and. iaptype.ge.3 .and. (abs(f1-nfqso).gt.napwid .and. abs(f1-nftx).gt.napwid) ) cycle
@@ -306,6 +307,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,nzhsym,lapon, & if(ncontest.eq.4) llrz(1:29)=apmag*mcqru(1:29)
if(ncontest.eq.5) llrz(1:29)=apmag*mcqww(1:29)
if(ncontest.eq.7) llrz(1:29)=apmag*mcq(1:29)
+ if(ncontest.eq.8) llrz(1:29)=apmag*mcqtest(1:29)
apmask(75:77)=1
llrz(75:76)=apmag*(-1)
llrz(77)=apmag*(+1)
@@ -313,7 +315,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,nzhsym,lapon, & if(iaptype.eq.2) then ! MyCall,???,???
apmask=0
- if(ncontest.eq.0.or.ncontest.eq.1.or.ncontest.eq.5) then
+ if(ncontest.eq.0.or.ncontest.eq.1.or.ncontest.eq.5.or.ncontest.eq.8) then
apmask(1:29)=1
llrz(1:29)=apmag*apsym(1:29)
apmask(75:77)=1
@@ -353,7 +355,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,nzhsym,lapon, & if(iaptype.eq.3) then ! MyCall,DxCall,???
apmask=0
- if(ncontest.eq.0.or.ncontest.eq.1.or.ncontest.eq.2.or.ncontest.eq.5.or.ncontest.eq.7) then
+ if(ncontest.eq.0.or.ncontest.eq.1.or.ncontest.eq.2.or.ncontest.eq.5.or.ncontest.eq.7.or.ncontest.eq.8) then
apmask(1:58)=1
llrz(1:58)=apmag*apsym
apmask(75:77)=1
@@ -379,7 +381,7 @@ subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,nzhsym,lapon, & if(iaptype.eq.5.and.ncontest.eq.7) cycle !Hound
if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then
apmask=0
- if(ncontest.le.5 .or. (ncontest.eq.7.and.iaptype.eq.6)) then
+ if(ncontest.le.5 .or. (ncontest.eq.7.and.iaptype.eq.6) .or. ncontest.eq.8) then
apmask(1:77)=1 ! mycall, hiscall, RRR|73|RR73
llrz(1:58)=apmag*apsym
if(iaptype.eq.4) llrz(59:77)=apmag*mrrr
diff --git a/lib/ft8/sync8.f90 b/lib/ft8/sync8.f90 index 5ea2254a..f93afe75 100755 --- a/lib/ft8/sync8.f90 +++ b/lib/ft8/sync8.f90 @@ -1,9 +1,10 @@ -subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, &
+subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,nzhsym,candidate, &
ncand,sbase)
include 'ft8_params.f90'
- parameter (MAXPRECAND=500)
-! Search over +/- 2.5s relative to 0.5s TX start time.
+ parameter (MAXPRECAND=1000)
+! Maximum sync correlation lag +/- 2.5s relative to 0.5s TX start time.
+! 2.5s / 0.16s/symbol * 4 samples/symbol = 62.5 lag steps in 2.5s
parameter (JZ=62)
complex cx(0:NH1)
real s(NH1,NHSYM)
@@ -12,11 +13,14 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, & real x(NFFT1)
real sync2d(NH1,-JZ:JZ)
real red(NH1)
+ real red2(NH1)
real candidate0(3,MAXPRECAND)
real candidate(3,maxcand)
real dd(NMAX)
integer jpeak(NH1)
+ integer jpeak2(NH1)
integer indx(NH1)
+ integer indx2(NH1)
integer ii(1)
integer icos7(0:6)
data icos7/3,1,4,0,6,5,2/ !Costas 7x7 tone pattern
@@ -82,11 +86,16 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, & enddo
red=0.
+ red2=0.
+ mlag=10
+ mlag2=JZ
do i=ia,ib
- ii=maxloc(sync2d(i,-JZ:JZ)) - 1 - JZ
- j0=ii(1)
- jpeak(i)=j0
- red(i)=sync2d(i,j0)
+ ii=maxloc(sync2d(i,-mlag:mlag)) - 1 - mlag
+ jpeak(i)=ii(1)
+ red(i)=sync2d(i,jpeak(i))
+ ii=maxloc(sync2d(i,-mlag2:mlag2)) - 1 - mlag2
+ jpeak2(i)=ii(1)
+ red2(i)=sync2d(i,jpeak2(i))
enddo
iz=ib-ia+1
call indexx(red(ia:ib),iz,indx)
@@ -100,14 +109,29 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, & if(ibase.gt.nh1) ibase=nh1
base=red(ibase)
red=red/base
-
+ call indexx(red2(ia:ib),iz,indx2)
+ ibase2=indx2(npctile) - 1 + ia
+ if(ibase2.lt.1) ibase2=1
+ if(ibase2.gt.nh1) ibase2=nh1
+ base2=red2(ibase2)
+ red2=red2/base2
do i=1,min(MAXPRECAND,iz)
n=ia + indx(iz+1-i) - 1
- if(red(n).lt.syncmin.or.isnan(red(n)).or.k.eq.MAXPRECAND) exit
- k=k+1
- candidate0(1,k)=n*df
- candidate0(2,k)=(jpeak(n)-0.5)*tstep
- candidate0(3,k)=red(n)
+ if(k.ge.MAXPRECAND) exit
+ if( (red(n).ge.syncmin) .and. (.not.isnan(red(n))) ) then
+ k=k+1
+ candidate0(1,k)=n*df
+ candidate0(2,k)=(jpeak(n)-0.5)*tstep
+ candidate0(3,k)=red(n)
+ endif
+ if(abs(jpeak2(n)-jpeak(n)).eq.0) cycle
+ if(k.ge.MAXPRECAND) exit
+ if( (red2(n).ge.syncmin) .and. (.not.isnan(red2(n))) ) then
+ k=k+1
+ candidate0(1,k)=n*df
+ candidate0(2,k)=(jpeak2(n)-0.5)*tstep
+ candidate0(3,k)=red2(n)
+ endif
enddo
ncand=k
@@ -116,7 +140,8 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, & if(i.ge.2) then
do j=1,i-1
fdiff=abs(candidate0(1,i))-abs(candidate0(1,j))
- if(abs(fdiff).lt.4.0) then
+ tdiff=abs(candidate0(2,i)-candidate0(2,j))
+ if(abs(fdiff).lt.4.0.and.tdiff.lt.0.04) then
if(candidate0(3,i).ge.candidate0(3,j)) candidate0(3,j)=0.
if(candidate0(3,i).lt.candidate0(3,j)) candidate0(3,i)=0.
endif
@@ -148,6 +173,5 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, & endif
enddo
ncand=k-1
-
return
end subroutine sync8
|
