From ca93ec1779d1e82d9c3cd64ddd89f3b92a824e70 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Thu, 4 Aug 2016 15:50:09 +0000 Subject: [PATCH] Quantize received msk40 reports. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6996 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/detectmsk40.f90 | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/detectmsk40.f90 b/lib/detectmsk40.f90 index fe8d9194e..68b4abef7 100644 --- a/lib/detectmsk40.f90 +++ b/lib/detectmsk40.f90 @@ -205,10 +205,22 @@ subroutine detectmsk40(cbig,n,pchk_file,mycall,hiscall,lines,nmessages, & t0=times(ip) + t00 cdat=cbig(imid-NPTS/2+1:imid+NPTS/2) ferr=ferrs(ip) - nsnr=nint(snrs(ip)) xsnr=snrs(ip) - if( nsnr .lt. -5 ) nsnr=-5 - if( nsnr .gt. 25 ) nsnr=25 + if( xsnr .lt. -1.5 ) then + nsnr=-3 + else if( xsnr .lt. 1.5 ) then + nsnr=0 + else if( xsnr .lt. 4.5 ) then + nsnr=3 + else if( xsnr .lt. 8.0 ) then + nsnr=6 + else if( xsnr .lt. 11.5 ) then + nsnr=10 + else if( xsnr .lt. 14.5 ) then + nsnr=13 + else + nsnr=16 + endif ! remove coarse freq error call tweak1(cdat,NPTS,-(1500+ferr),cdat)