Use 37 character message for de-duping. Comment out some code that needs to be updated to work with new message type.

This commit is contained in:
Steve Franke 2018-07-04 16:20:12 -05:00
parent 50d8945bca
commit a448dc5640
2 changed files with 52 additions and 49 deletions

View File

@ -256,40 +256,41 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
apmask=0
iaptype=0
endif
if(ipass .gt. 4) then
llrd=llrb ! Needs to be checked
if(.not.lapcqonly) then
iaptype=naptypes(nQSOProgress,ipass-4)
else
iaptype=1
endif
if(iaptype.ge.3 .and. (abs(f1-nfqso).gt.napwid .and. abs(f1-nftx).gt.napwid) ) cycle
if(iaptype.eq.1 .or. iaptype.eq.2 ) then ! AP,???,???
apmask=0
apmask(1:27)=1 ! first 27 bits (9 tones) are AP
if(iaptype.eq.1) llrd(1:27)=apmag*mcq(1:27)
if(iaptype.eq.2) llrd(1:27)=apmag*apsym(1:27)
endif
if(iaptype.eq.3) then ! mycall, dxcall, ???
apmask=0
apmask(1:54)=1
llrd(1:54)=apmag*apsym(1:54)
endif
if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then
apmask=0
apmask(1:72)=1 ! mycall, hiscall, RRR|73|RR73
llrd(1:56)=apmag*apsym(1:56)
if(iaptype.eq.4) llrd(57:72)=apmag*mrrr
if(iaptype.eq.5) llrd(57:72)=apmag*m73
if(iaptype.eq.6) llrd(57:72)=apmag*mrr73
endif
if(iaptype.eq.7) then ! ???, dxcall, ???
apmask=0
apmask(31:54)=1 ! hiscall
llrd(31:54)=apmag*apsym(31:54)
endif
endif
! The AP stuff needs to be re-done to accommodate the new message types.
! if(ipass .gt. 4) then
! llrd=llrb ! Needs to be checked
! if(.not.lapcqonly) then
! iaptype=naptypes(nQSOProgress,ipass-4)
! else
! iaptype=1
! endif
! if(iaptype.ge.3 .and. (abs(f1-nfqso).gt.napwid .and. abs(f1-nftx).gt.napwid) ) cycle
! if(iaptype.eq.1 .or. iaptype.eq.2 ) then ! AP,???,???
! apmask=0
! apmask(1:27)=1 ! first 27 bits (9 tones) are AP
! if(iaptype.eq.1) llrd(1:27)=apmag*mcq(1:27)
! if(iaptype.eq.2) llrd(1:27)=apmag*apsym(1:27)
! endif
! if(iaptype.eq.3) then ! mycall, dxcall, ???
! apmask=0
! apmask(1:54)=1
! llrd(1:54)=apmag*apsym(1:54)
! endif
! if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then
! apmask=0
! apmask(1:72)=1 ! mycall, hiscall, RRR|73|RR73
! llrd(1:56)=apmag*apsym(1:56)
! if(iaptype.eq.4) llrd(57:72)=apmag*mrrr
! if(iaptype.eq.5) llrd(57:72)=apmag*m73
! if(iaptype.eq.6) llrd(57:72)=apmag*mrr73
! endif
! if(iaptype.eq.7) then ! ???, dxcall, ???
! apmask=0
! apmask(31:54)=1 ! hiscall
! llrd(31:54)=apmag*apsym(31:54)
! endif
! endif
cw=0
call timer('bpd174_91 ',0)
@ -311,13 +312,12 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
call osd174_91(llrd,apmask,ndeep,message77,cw,nharderrors,dmin)
call timer('osd174_91 ',1)
endif
msg37=' '
xsnr=-99.0
if(nharderrors.lt.0) cycle
if(count(cw.eq.0).eq.174) cycle !Reject the all-zero codeword
nbadcrc=0 ! If we get this far, must be a valid codeword.
i3=4*message77(72) + 2*message77(73) + message77(74)
n3=4*message77(75) + 2*message77(76) + message77(77)
write(c77,'(77i1)') message77
read(c77(72:74),'(b3)') n3
read(c77(75:77),'(b3)') i3
@ -340,6 +340,8 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
xsnr=0.001
if(xnoi.gt.0 .and. xnoi.lt.xsig) xsnr=xsig/xnoi-1.0
xsnr=10.0*log10(xsnr)-27.0
! need to reconcile signal normalization between this routine and the old ft8b_1 so
! that SNRs come out the same.
xsnr2=db(xsig/xbase - 1.0) - 32.0
if(.not.nagain) xsnr=xsnr2
if(xsnr .lt. -24.0) xsnr=-24.0

View File

@ -53,7 +53,7 @@ contains
integer*2 iwave(15*12000)
integer apsym1(KK),apsym2(77)
character datetime*13,message*22,msg37*37
character*22 allmessages(100)
character*37 allmessages(100)
integer allsnrs(100)
save s,dd
@ -69,7 +69,7 @@ contains
apsym2=0
dd=iwave
ndecodes=0
allmessages=' '
allmessages=' '
allsnrs=0
ifa=nfa
ifb=nfb
@ -105,11 +105,11 @@ contains
sync=candidate(3,icand)
f1=candidate(1,icand)
xdt=candidate(2,icand)
iftype=candidate(4,icand)
isync=candidate(4,icand)
xbase=10.0**(0.1*(sbase(nint(f1/3.125))-40.0))
nsnr0=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ###
call timer('ft8b ',0)
if(iftype.eq.1) then
if(isync.eq.1) then
call ft8b_1(dd,newdat,nQSOProgress,nfqso,nftx,ndepth,lft8apon, &
lapcqonly,napwid,lsubtract,nagain,iaptype,mycall12,mygrid6, &
hiscall12,bcontest,sync,f1,xdt,xbase,apsym1,nharderrors,dmin, &
@ -120,31 +120,32 @@ contains
hiscall12,bcontest,sync,f1,xdt,xbase,apsym2,nharderrors,dmin, &
nbadcrc,iappass,iera,msg37,xsnr)
endif
message=msg37(1:22) !###
! message=msg37(1:22) !###
nsnr=nint(xsnr)
xdt=xdt-0.5
hd=nharderrors+dmin
call timer('ft8b ',1)
if(nbadcrc.eq.0) then
! call jtmsg(message,iflag)
if(bcontest) then
call fix_contest_msg(mygrid6,message)
msg37(1:22)=message
endif
! This probably needs to be re-visited for the new message type
! if(bcontest) then
! call fix_contest_msg(mygrid6,message)
! msg37(1:22)=message
! endif
! if(iand(iflag,31).ne.0) message(22:22)='?'
ldupe=.false.
do id=1,ndecodes
if(message.eq.allmessages(id).and.nsnr.le.allsnrs(id)) ldupe=.true.
if(msg37.eq.allmessages(id).and.nsnr.le.allsnrs(id)) ldupe=.true.
enddo
if(.not.ldupe) then
ndecodes=ndecodes+1
allmessages(ndecodes)=message
allmessages(ndecodes)=msg37
allsnrs(ndecodes)=nsnr
endif
write(81,1004) nutc,ncand,icand,ipass,iaptype,iappass, &
nharderrors,dmin,hd,min(sync,999.0),nint(xsnr), &
xdt,nint(f1),message,iftype,nbadcrc
1004 format(i6.6,2i4,3i2,i3,3f6.1,i4,f6.2,i5,2x,a22,i4,i4)
xdt,nint(f1),msg37,isync,nbadcrc
1004 format(i6.6,2i4,3i2,i3,3f6.1,i4,f6.2,i5,2x,a37,i4,i4)
flush(81)
if(.not.ldupe .and. associated(this%callback)) then
qual=1.0-(nharderrors+dmin)/60.0 ! scale qual to [0.0,1.0]