Work toward a generalized sequence detector for nsymbols=1, 2, or 3. Works for nsymbol=3, but not yet for nsymbol=1, or 2.

This commit is contained in:
Steve Franke 2018-06-25 17:01:34 -05:00
parent 0f5759270e
commit 7684bd0e78

View File

@ -14,8 +14,8 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
logical bcontest
real a(5)
real s8d(0:7,ND),s8(0:7,NN),s8dsort(8*ND)
real s64(0:7,0:7)
real ps(0:63),psl(0:63)
real s512(0:511)
real ps(0:512),psl(0:512)
real bmeta(3*ND),bmetb(3*ND),bmetc(3*ND),bmetap(3*ND)
real llra(3*ND),llrb(3*ND),llrc(3*ND),llrd(3*ND) !Soft symbols
real dd0(15*12000)
@ -29,7 +29,8 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
integer nappasses(0:5) !Number of decoding passes to use for each QSO state
integer naptypes(0:5,4) ! (nQSOProgress, decoding pass) maximum of 4 passes for now
integer*1, target:: i1hiscall(12)
integer invgraymap(0:7)
logical bitisone(0:511,0:8)
integer graymap(0:7)
complex cd0(3200)
complex ctwk(32)
complex csymb(32)
@ -43,9 +44,8 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
data mde/1,1,1,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0,0,1,1,1,0,1,0,0,0,1/
data mrr73/0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,1/
data first/.true./
data invgraymap/0,1,3,2,6,7,5,4/
save nappasses,naptypes
data graymap/0,1,3,2,7,6,4,5/
save nappasses,naptypes,bitisone
if(first) then
mcq=2*mcq-1
@ -76,6 +76,14 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
naptypes(3,1:4)=(/3,4,5,6/)
naptypes(4,1:4)=(/3,4,5,6/)
naptypes(5,1:4)=(/3,1,2,0/)
bitisone=.false.
do i=0,511
do j=0,8
if(iand(i,2**(8-j)).ne.0) bitisone(i,j)=.true.
enddo
write(*,*) i,bitisone(i,0:8)
enddo
first=.false.
endif
@ -196,58 +204,30 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
enddo
! Do 2-symbol detection
nsym=3
nt=2**(3*nsym)
do ihalf=1,2
do k=1,29,2
do k=1,29,nsym
if(ihalf.eq.1) ks=k+7
if(ihalf.eq.2) ks=k+43
amax=-1.0
do i=0,63
il=i/8
ir=iand(i,7)
s64(il,ir)=abs(cs(il,ks)+cs(ir,ks+1))
if(s64(il,ir).gt.amax) then
ilb=il
irb=ir
amax=s64(il,ir)
endif
do i=0,nt-1
i1=i/64
i2=iand(i,63)/8
i3=iand(i,7)
s512(i)=abs(cs(graymap(i1),ks)+cs(graymap(i2),ks+1)+cs(graymap(i3),ks+2))
enddo
!write(*,*) k,ilb,irb,amax
maxa0=maxval(s64(0:7,0))
maxa1=maxval(s64(0:7,1))
maxa2=maxval(s64(0:7,2))
maxa3=maxval(s64(0:7,3))
maxa4=maxval(s64(0:7,4))
maxa5=maxval(s64(0:7,5))
maxa6=maxval(s64(0:7,6))
maxa7=maxval(s64(0:7,7))
max0a=maxval(s64(0,0:7))
max1a=maxval(s64(1,0:7))
max2a=maxval(s64(2,0:7))
max3a=maxval(s64(3,0:7))
max4a=maxval(s64(4,0:7))
max5a=maxval(s64(5,0:7))
max6a=maxval(s64(6,0:7))
max7a=maxval(s64(7,0:7))
r1=max(maxa1,maxa2,maxa5,maxa6) - &
max(maxa0,maxa3,maxa4,maxa7)
r2=max(maxa2,maxa3,maxa4,maxa5) - &
max(maxa0,maxa1,maxa6,maxa7)
r4=max(maxa4,maxa5,maxa6,maxa7) - &
max(maxa0,maxa1,maxa2,maxa3)
r8=max(max1a,max2a,max5a,max6a) - &
max(max0a,max3a,max4a,max7a)
r16=max(max2a,max3a,max4a,max5a) - &
max(max0a,max1a,max6a,max7a)
r32=max(max4a,max5a,max6a,max7a) - &
max(max0a,max1a,max2a,max3a)
i32=1+(k-1)*3+(ihalf-1)*87
bmetc(i32)=r32
bmetc(i32+1)=r16
bmetc(i32+2)=r8
if(k.lt.29) then
bmetc(i32+3)=r4
bmetc(i32+4)=r2
bmetc(i32+5)=r1
bmetc(i32)=maxval(s512,bitisone(0:nt-1,0))-maxval(s512,.not.bitisone(0:nt-1,0))
bmetc(i32+1)=maxval(s512,bitisone(0:nt-1,1))-maxval(s512,.not.bitisone(0:nt-1,1))
bmetc(i32+2)=maxval(s512,bitisone(0:nt-1,2))-maxval(s512,.not.bitisone(0:nt-1,2))
bmetc(i32+3)=maxval(s512,bitisone(0:nt-1,3))-maxval(s512,.not.bitisone(0:nt-1,3))
bmetc(i32+4)=maxval(s512,bitisone(0:nt-1,4))-maxval(s512,.not.bitisone(0:nt-1,4))
bmetc(i32+5)=maxval(s512,bitisone(0:nt-1,5))-maxval(s512,.not.bitisone(0:nt-1,5))
if(k.lt.28) then
bmetc(i32+6)=maxval(s512,bitisone(0:nt-1,6))-maxval(s512,.not.bitisone(0:nt-1,6))
bmetc(i32+7)=maxval(s512,bitisone(0:nt-1,7))-maxval(s512,.not.bitisone(0:nt-1,7))
bmetc(i32+8)=maxval(s512,bitisone(0:nt-1,8))-maxval(s512,.not.bitisone(0:nt-1,8))
endif
enddo
enddo
@ -257,9 +237,9 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
call normalizebmet(bmetc,3*ND)
bmetap=bmeta
!do i=1,174
!write(*,*) i,bmeta(i),bmetc(i)
!enddo
do i=1,174
write(*,*) i,bmeta(i),bmetc(i)
enddo
scalefac=2.83
llra=scalefac*bmeta