From f039bc66253d14011fc09263ae83548e5329cf88 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Sun, 5 Nov 2017 14:44:15 +0000 Subject: [PATCH] Label JT65 AP decodes as such. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8220 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/decoder.f90 | 6 +++++- lib/fsk4hf/extract_ap.f90 | 24 +++++++++++++++++------- lib/jt65_decode.f90 | 1 + 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/lib/decoder.f90 b/lib/decoder.f90 index fe7be9326..0763cad65 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -316,7 +316,7 @@ contains integer, intent(in) :: nsum integer, intent(in) :: minsync - integer i,nft + integer i,nap,nft logical is_deep,is_average character decoded*22,csync*2,cflags*3 @@ -358,6 +358,10 @@ contains write(cflags(2:2),'(i1)') min(nsum,9) if(nsum.ge.10) cflags(2:2)='*' endif + nap=ishft(ft,-2) + if(nap.ne.0) then + write(cflags(1:3),'(a1,i2.2)') 'a',nap + endif endif csync='# ' i=0 diff --git a/lib/fsk4hf/extract_ap.f90 b/lib/fsk4hf/extract_ap.f90 index 3be3db13d..5e7c08fb6 100644 --- a/lib/fsk4hf/extract_ap.f90 +++ b/lib/fsk4hf/extract_ap.f90 @@ -24,7 +24,7 @@ subroutine extract(s3,nadd,mode65,ntrials,naggressive,ndepth,nflip, & character decoded*22, apmessage*22 character*12 mycall_12,hiscall_12 character*6 mycall,hiscall,hisgrid - integer apsymbols(12) + integer apsymbols(12),ap(12) integer dat4(12) integer mrsym(63),mr2sym(63),mrprob(63),mr2prob(63) integer correct(63),tmp(63) @@ -90,14 +90,16 @@ subroutine extract(s3,nadd,mode65,ntrials,naggressive,ndepth,nflip, & call graycode65(mr2sym,63,-1) !Remove gray code and interleaving call interleave63(mr2sym,-1) !from second-most-reliable symbols call interleave63(mr2prob,-1) + +do ipass=1,2 + ap=-1 + if(ipass.eq.2 .and. count(apsymbols.ge.0).gt.0) then + ap=apsymbols + endif ntry=0 - -! call gf64_osd(s3,correct) - call timer('ftrsd ',0) param=0 -! call ftrsd2(mrsym,mrprob,mr2sym,mr2prob,ntrials,correct,param,ntry) - call ftrsdap(mrsym,mrprob,mr2sym,mr2prob,apsymbols,ntrials,correct,param,ntry) + call ftrsdap(mrsym,mrprob,mr2sym,mr2prob,ap,ntrials,correct,param,ntry) call timer('ftrsd ',1) ncandidates=param(0) nhard=param(1) @@ -112,7 +114,15 @@ subroutine extract(s3,nadd,mode65,ntrials,naggressive,ndepth,nflip, & nd0=83 r0=0.90 endif - if(ntotal.le.nd0 .and. rtt.le.r0) nft=1 + + if(ntotal.le.nd0 .and. rtt.le.r0) then + nft=1 + nap=count(ap.ge.0) + nft=1+ishft(nap,2) + endif + + if(nft.gt.0) exit +enddo if(nft.eq.0 .and. iand(ndepth,32).eq.32) then qmin=2.0 - 0.1*naggressive diff --git a/lib/jt65_decode.f90 b/lib/jt65_decode.f90 index d446373f9..28e476ff9 100644 --- a/lib/jt65_decode.f90 +++ b/lib/jt65_decode.f90 @@ -255,6 +255,7 @@ contains if(nsnr.gt.-1) nsnr=-1 nftt=0 +!********* DOES THIS STILL WORK WHEN NFT INCLUDES # OF AP SYMBOLS USED?? if(nft.ne.1 .and. iand(ndepth,16).eq.16 .and. (.not.prtavg)) then ! Single-sequence FT decode failed, so try for an average FT decode. if(nutc.ne.nutc0 .or. abs(nfreq-nfreq0).gt.ntol) then