Merge branch 'feat-APforALL' into develop

This commit is contained in:
Steve Franke 2018-10-04 16:41:46 -05:00
commit 60c3b9a8ff
2 changed files with 90 additions and 33 deletions

View File

@ -23,7 +23,8 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
real dd0(15*12000) real dd0(15*12000)
integer*1 message77(77),apmask(174),cw(174) integer*1 message77(77),apmask(174),cw(174)
integer apsym(58) integer apsym(58)
integer mcq(29),mcqru(29),mrrr(19),m73(19),mrr73(19) integer mcq(29),mcqru(29),mcqfd(29),mcqtest(29),mcqhund(29)
integer mrrr(19),m73(19),mrr73(19)
integer itone(NN) integer itone(NN)
integer icos7(0:6),ip(1) integer icos7(0:6),ip(1)
integer nappasses(0:5) !Number of decoding passes to use for each QSO state integer nappasses(0:5) !Number of decoding passes to use for each QSO state
@ -38,11 +39,14 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
complex cs(0:7,NN) complex cs(0:7,NN)
logical first,newdat,lsubtract,lapon,lapcqonly,nagain,unpk77_success logical first,newdat,lsubtract,lapon,lapcqonly,nagain,unpk77_success
data icos7/3,1,4,0,6,5,2/ ! Flipped w.r.t. original FT8 sync array data icos7/3,1,4,0,6,5,2/ ! Flipped w.r.t. original FT8 sync array
data mcq/0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0/ data mcq/0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0/
data mcqru/0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,1,1,0,0/ data mcqru/0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,1,1,0,0/
data mrrr/0,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,1/ data mcqfd/0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,1,0/
data m73/0,1,1,1,1,1,1,0,1,0,0,1,0,1,0,0,0,0,1/ data mcqtest/0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,1,0,1,1,1,1,1,1,0,0,1,0/
data mrr73/0,1,1,1,1,1,1,0,0,1,1,1,0,1,0,1,0,0,1/ data mcqhund/0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,1,0,0,1,1,1,0,0/
data mrrr/0,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,1/
data m73/0,1,1,1,1,1,1,0,1,0,0,1,0,1,0,0,0,0,1/
data mrr73/0,1,1,1,1,1,1,0,0,1,1,1,0,1,0,1,0,0,1/
data first/.true./ data first/.true./
data graymap/0,1,3,2,5,6,4,7/ data graymap/0,1,3,2,5,6,4,7/
save nappasses,naptypes,ncontest0,one,hiscall12_0 save nappasses,naptypes,ncontest0,one,hiscall12_0
@ -50,7 +54,10 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
if(first.or.(ncontest.ne.ncontest0)) then if(first.or.(ncontest.ne.ncontest0)) then
mcq=2*mcq-1 mcq=2*mcq-1
mcqfd=2*mcqfd-1
mcqru=2*mcqru-1 mcqru=2*mcqru-1
mcqtest=2*mcqtest-1
mcqhund=2*mcqhund-1
mrrr=2*mrrr-1 mrrr=2*mrrr-1
m73=2*m73-1 m73=2*m73-1
mrr73=2*mrr73-1 mrr73=2*mrr73-1
@ -70,12 +77,12 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
! 5 MyCall DxCall 73 (77 ap bits) ! 5 MyCall DxCall 73 (77 ap bits)
! 6 MyCall DxCall RR73 (77 ap bits) ! 6 MyCall DxCall RR73 (77 ap bits)
naptypes(0,1:4)=(/1,2,0,0/) naptypes(0,1:4)=(/1,2,0,0/) ! Tx6 selected (CQ)
naptypes(1,1:4)=(/2,3,0,0/) naptypes(1,1:4)=(/2,3,0,0/) ! Tx1
naptypes(2,1:4)=(/2,3,0,0/) naptypes(2,1:4)=(/2,3,0,0/) ! Tx2
naptypes(3,1:4)=(/3,4,5,6/) naptypes(3,1:4)=(/3,4,5,6/) ! Tx3
naptypes(4,1:4)=(/3,4,5,6/) naptypes(4,1:4)=(/3,4,5,6/) ! Tx4
naptypes(5,1:4)=(/3,1,2,0/) naptypes(5,1:4)=(/3,1,2,0/) ! Tx5
one=.false. one=.false.
do i=0,511 do i=0,511
@ -242,7 +249,7 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
! 6 ap pass 3 ! 6 ap pass 3
! 7 ap pass 4 ! 7 ap pass 4
if(lapon.and.(ncontest.eq.0.or.ncontest.eq.4)) then if(lapon.or.ncontest.eq.6) then !Hounds always use AP
if(.not.lapcqonly) then if(.not.lapcqonly) then
npasses=3+nappasses(nQSOProgress) npasses=3+nappasses(nQSOProgress)
else else
@ -268,16 +275,32 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
else else
iaptype=1 iaptype=1
endif endif
if(iaptype.ge.2 .and. apsym(1).gt.1) cycle ! no mycall was entered
if(iaptype.ge.3 .and. apsym(30).gt.1) cycle ! no, or nonstandard dxcall
if(iaptype.ge.3 .and. (abs(f1-nfqso).gt.napwid .and. abs(f1-nftx).gt.napwid) ) cycle
apsym=2*apsym-1
if(iaptype.eq.1) then ! CQ,???,??? or CQ RU,???,??? ! ncontest=0 : NONE
! 1 : NA_VHF
! 2 : EU_VHF
! 3 : FIELD DAY
! 4 : RTTY
! 5 : FOX
! 6 : HOUND
!
! Conditions that cause us to bail out of AP decoding
if(ncontest.le.4 .and. iaptype.ge.3 .and. (abs(f1-nfqso).gt.napwid .and. abs(f1-nftx).gt.napwid) ) cycle
if(ncontest.eq.5) cycle ! No AP for Foxes
if(ncontest.eq.6.and.f1.gt.950.0) cycle ! Hounds use AP only for signals below 950 Hz
if(iaptype.ge.2 .and. apsym(1).gt.1) cycle ! No, or nonstandard, mycall
if(iaptype.ge.3 .and. apsym(30).gt.1) cycle ! No, or nonstandard, dxcall
apsym=2*apsym-1 ! Change from [0,1] to antipodal
if(iaptype.eq.1) then ! CQ or CQ RU or CQ TEST or CQ FD
apmask=0 apmask=0
apmask(1:29)=1 apmask(1:29)=1
if( ncontest.eq.0) llrd(1:29)=apmag*mcq(1:29) if(ncontest.eq.0) llrd(1:29)=apmag*mcq(1:29)
if( ncontest.eq.4) llrd(1:29)=apmag*mcqru(1:29) if(ncontest.eq.1) llrd(1:29)=apmag*mcqtest(1:29)
if(ncontest.eq.2) llrd(1:29)=apmag*mcqtest(1:29)
if(ncontest.eq.3) llrd(1:29)=apmag*mcqfd(1:29)
if(ncontest.eq.4) llrd(1:29)=apmag*mcqru(1:29)
if(ncontest.eq.6) llrd(1:29)=apmag*mcqhund(1:29)
apmask(75:77)=1 apmask(75:77)=1
llrd(75:76)=apmag*(-1) llrd(75:76)=apmag*(-1)
llrd(77)=apmag*(+1) llrd(77)=apmag*(+1)
@ -285,30 +308,58 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
if(iaptype.eq.2) then ! MyCall,???,??? if(iaptype.eq.2) then ! MyCall,???,???
apmask=0 apmask=0
if(ncontest.eq.0) then if(ncontest.eq.0.or.ncontest.eq.1) then
apmask(1:29)=1 apmask(1:29)=1
llrd(1:29)=apmag*apsym(1:29) llrd(1:29)=apmag*apsym(1:29)
apmask(75:77)=1 apmask(75:77)=1
llrd(75:76)=apmag*(-1) llrd(75:76)=apmag*(-1)
llrd(77)=apmag*(+1) llrd(77)=apmag*(+1)
else if(ncontest.eq.2) then
apmask(1:28)=1
llrd(1:28)=apmag*apsym(1:28)
apmask(72:74)=1
llrd(72)=apmag*(-1)
llrd(73)=apmag*(+1)
llrd(74)=apmag*(-1)
apmask(75:77)=1
llrd(75:77)=apmag*(-1)
else if(ncontest.eq.3) then
apmask(1:28)=1
llrd(1:28)=apmag*apsym(1:28)
apmask(75:77)=1
llrd(75:77)=apmag*(-1)
else if(ncontest.eq.4) then else if(ncontest.eq.4) then
apmask(2:29)=1 apmask(2:29)=1
llrd(2:29)=apmag*apsym(1:28) llrd(2:29)=apmag*apsym(1:28)
apmask(75:77)=1 apmask(75:77)=1
llrd(75)=apmag*(-1) llrd(75)=apmag*(-1)
llrd(76:77)=apmag*(+1) llrd(76:77)=apmag*(+1)
else if(ncontest.eq.6) then ! ??? RR73; MyCall <???> ???
apmask(29:56)=1
llrd(29:56)=apmag*apsym(1:28)
apmask(72:77)=1
llrd(72:73)=apmag*(-1)
llrd(74)=apmag*(+1)
llrd(75:77)=apmag*(-1)
endif endif
endif endif
if(iaptype.eq.3) then ! MyCall,DxCall,??? if(iaptype.eq.3) then ! MyCall,DxCall,???
apmask=0 apmask=0
if(ncontest.eq.0) then if(ncontest.eq.0.or.ncontest.eq.1.or.ncontest.eq.2.or.ncontest.eq.6) then
apmask(1:58)=1 apmask(1:58)=1
llrd(1:58)=apmag*apsym llrd(1:58)=apmag*apsym
apmask(75:77)=1 apmask(75:77)=1
llrd(75:76)=apmag*(-1) llrd(75:76)=apmag*(-1)
llrd(77)=apmag*(+1) llrd(77)=apmag*(+1)
else if(ncontest.eq.4) then else if(ncontest.eq.3) then ! Field Day
apmask(1:56)=1
llrd(1:28)=apmag*apsym(1:28)
llrd(29:56)=apmag*apsym(30:57)
apmask(72:74)=1
apmask(75:77)=1
llrd(75:77)=apmag*(-1)
else if(ncontest.eq.4) then ! RTTY RU
apmask(2:57)=1 apmask(2:57)=1
llrd(2:29)=apmag*apsym(1:28) llrd(2:29)=apmag*apsym(1:28)
llrd(30:57)=apmag*apsym(30:57) llrd(30:57)=apmag*apsym(30:57)
@ -318,13 +369,23 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
endif endif
endif endif
if(iaptype.eq.5.and.ncontest.eq.6) cycle !Hound
if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then
apmask=0 apmask=0
apmask(1:77)=1 ! mycall, hiscall, RRR|73|RR73 if(ncontest.le.4 .or. (ncontest.eq.6.and.iaptype.eq.6)) then
llrd(1:58)=apmag*apsym apmask(1:77)=1 ! mycall, hiscall, RRR|73|RR73
if(iaptype.eq.4) llrd(59:77)=apmag*mrrr llrd(1:58)=apmag*apsym
if(iaptype.eq.5) llrd(59:77)=apmag*m73 if(iaptype.eq.4) llrd(59:77)=apmag*mrrr
if(iaptype.eq.6) llrd(59:77)=apmag*mrr73 if(iaptype.eq.5) llrd(59:77)=apmag*m73
if(iaptype.eq.6) llrd(59:77)=apmag*mrr73
else if(ncontest.eq.6.and.iaptype.eq.4) then ! Hound listens for MyCall RR73;...
apmask(1:28)=1
llrd(1:28)=apmag*apsym(1:28)
apmask(72:77)=1
llrd(72:73)=apmag*(-1)
llrd(74)=apmag*(1)
llrd(75:77)=apmag*(-1)
endif
endif endif
endif endif
@ -339,7 +400,7 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
if(abs(nfqso-f1).le.napwid .or. abs(nftx-f1).le.napwid) then if(abs(nfqso-f1).le.napwid .or. abs(nftx-f1).le.napwid) then
if((ipass.eq.3 .or. ipass.eq.4) .and. .not.nagain) then if((ipass.eq.3 .or. ipass.eq.4) .and. .not.nagain) then
ndeep=3 ndeep=3
else else
ndeep=4 ndeep=4
endif endif
endif endif
@ -380,7 +441,6 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, &
if(arg.gt.0.1) xsnr2=arg if(arg.gt.0.1) xsnr2=arg
xsnr=10.0*log10(xsnr)-27.0 xsnr=10.0*log10(xsnr)-27.0
xsnr2=10.0*log10(xsnr2)-27.0 xsnr2=10.0*log10(xsnr2)-27.0
!write(87,'(f10.1,2x,f10.1)') xsnr,xsnr2
if(.not.nagain) then if(.not.nagain) then
xsnr=xsnr2 xsnr=xsnr2
endif endif

View File

@ -131,9 +131,6 @@ contains
hd=nharderrors+dmin hd=nharderrors+dmin
call timer('ft8b ',1) call timer('ft8b ',1)
if(nbadcrc.eq.0) then if(nbadcrc.eq.0) then
! call jtmsg(message,iflag)
! This probably needs to be re-visited for the new message type
! if(iand(iflag,31).ne.0) message(22:22)='?'
ldupe=.false. ldupe=.false.
do id=1,ndecodes do id=1,ndecodes
if(msg37.eq.allmessages(id).and.nsnr.le.allsnrs(id)) ldupe=.true. if(msg37.eq.allmessages(id).and.nsnr.le.allsnrs(id)) ldupe=.true.