From 13b5cc479b6533b307b4490c84133ed018682d88 Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Wed, 26 Sep 2018 08:29:01 -0500 Subject: [PATCH 1/2] Fix and re-enable polyfit SNR. --- lib/ft8/ft8b_2.f90 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/ft8/ft8b_2.f90 b/lib/ft8/ft8b_2.f90 index 64be91693..133a1de8a 100644 --- a/lib/ft8/ft8b_2.f90 +++ b/lib/ft8/ft8b_2.f90 @@ -124,7 +124,7 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & ctwk(i)=cmplx(cos(phi),sin(phi)) phi=mod(phi+dphi,twopi) enddo - call sync8d(cd0,i0,ctwk,1,2,sync) + call sync8d(cd0,i0,ctwk,1,2,sync) if( sync .gt. smax ) then smax=sync delfbest=delf @@ -335,13 +335,16 @@ subroutine ft8b_2(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,lapcqonly, & xnoi=xnoi+s8(ios,i)**2 enddo xsnr=0.001 - if(xnoi.gt.0 .and. xnoi.lt.xsig) xsnr=xsig/xnoi-1.0 -! if(.not.nagain) then -! xbase=10**(xbase/10.0) -! arg=xsig/xbase/3.6e6-1.0 -! if(arg.gt.0.1) xsnr=arg -! endif + xsnr2=0.001 + arg=xsig/xnoi-1.0 + if(arg.gt.0.1) xsnr=arg + arg=xsig/xbase/2.8e6-1.0 + if(arg.gt.0.1) xsnr2=arg xsnr=10.0*log10(xsnr)-27.0 + xsnr2=10.0*log10(xsnr2)-27.0 + if(.not.nagain) then + xsnr=xsnr2 + endif if(xsnr .lt. -24.0) xsnr=-24.0 return From a09385604a305049765a01cc3a6ebbfc4afec9ed Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Wed, 26 Sep 2018 08:30:41 -0500 Subject: [PATCH 2/2] Fix a typo - thanks NU0C. --- lib/crc.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crc.f90 b/lib/crc.f90 index f932803c8..a36e364f9 100644 --- a/lib/crc.f90 +++ b/lib/crc.f90 @@ -26,7 +26,7 @@ module crc integer (c_int), value :: length end function crc13 - function crc13_check (data, length) bind (C, name="crc14_check") + function crc13_check (data, length) bind (C, name="crc13_check") use, intrinsic :: iso_c_binding, only: c_bool, c_ptr, c_int implicit none logical (c_bool) :: crc13_check