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 diff --git a/lib/fst280_decode.f90 b/lib/fst280_decode.f90 index 377332cb7..a0e4b4a0c 100644 --- a/lib/fst280_decode.f90 +++ b/lib/fst280_decode.f90 @@ -442,9 +442,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 @@ -465,7 +466,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