From ae9183a4c15f7f10e4c88ef78fa575eaad1da1cd Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 12 Oct 2016 17:33:49 +0000 Subject: [PATCH] Improved noise estimate to account for data gap at start of MSK144 sequence. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7167 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/mskrtd.f90 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/mskrtd.f90 b/lib/mskrtd.f90 index 5b7727c22..75078b972 100644 --- a/lib/mskrtd.f90 +++ b/lib/mskrtd.f90 @@ -74,14 +74,13 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,hiscall, & ! If no decode, entire-block average will be used to update noise estimate. pmax=-99 do i=1,8 - ib=(i-1)*NSPM+1 - ie=ib+NSPM-1 - pow(i)=real(dot_product(cdat(ib:ie),cdat(ib:ie)))*rms**2 - if( pow(i) .gt. pmax ) then - pmax=pow(i) - endif + ib=(i-1)*NSPM+1 + ie=ib+NSPM-1 + pow(i)=real(dot_product(cdat(ib:ie),cdat(ib:ie)))*rms**2 + pmax=max(pmax,pow(i)) enddo pavg=sum(pow)/8.0 + if(tsec.lt.0.1) pavg=sum(pow(6:8))/3.0 ! Short ping decoder uses squared-signal spectrum to determine where to ! center a 3-frame analysis window and attempts to decode each of the