From e78f1abcedccca04eaddc6cefba01da2fc615cae Mon Sep 17 00:00:00 2001 From: K9AN Date: Fri, 19 Jun 2020 20:56:50 -0500 Subject: [PATCH 1/2] Make sure that ncand is correct even when the number of candidates has been limited. --- lib/fst280_decode.f90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/fst280_decode.f90 b/lib/fst280_decode.f90 index a0e0c73dd..04806a27d 100644 --- a/lib/fst280_decode.f90 +++ b/lib/fst280_decode.f90 @@ -441,9 +441,10 @@ contains call pctile(s2(ia:ib),ib-ia+1,30,base) s2=s2/base - thresh=1.25 + thresh=1.4 ncand=0 + candidates=0 if(ia.lt.3) ia=3 if(ib.gt.18000-2) ib=18000-2 do i=ia,ib @@ -464,7 +465,8 @@ contains snr_cand(1:ncand)=candidates(1:ncand,2) call indexx(snr_cand,ncand,indx) nmax=5 - do i=1,min(ncand,nmax) + ncand=min(ncand,nmax) + do i=1,ncand j=indx(ncand+1-i) candidates0(i,1:4)=candidates(j,1:4) enddo From 644a570cb995b638c3fe9c75487e90a168cc8046 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Sat, 20 Jun 2020 12:37:37 -0500 Subject: [PATCH 2/2] Enable sync checks on candidates. --- lib/fst280/get_fst280_bitmetrics.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fst280/get_fst280_bitmetrics.f90 b/lib/fst280/get_fst280_bitmetrics.f90 index 50568210f..bba000d59 100644 --- a/lib/fst280/get_fst280_bitmetrics.f90 +++ b/lib/fst280/get_fst280_bitmetrics.f90 @@ -72,10 +72,10 @@ subroutine get_fst280_bitmetrics(cd,nss,hmod,bitmetrics,badsync) nsync=is1+is2+is3 !Number of correct hard sync symbols, 0-24 badsync=.false. -! if(nsync .lt. 8) then -! badsync=.true. -! return -! endif + if(nsync .lt. 8) then + badsync=.true. + return + endif bitmetrics=0.0 do nseq=1,4 !Try coherent sequences of 1, 2, and 4 symbols