From d83d2d4407eef87ea085637d67a29e36334755ef Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 30 Aug 2012 18:47:41 +0000 Subject: [PATCH] Use ntol to distinguise spectra to be used for message averaging. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2544 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- libm65/decode1a.f | 7 ++++--- libm65/map65a.f90 | 4 ++-- libm65/s3avg.f90 | 4 ++-- mainwindow.cpp | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libm65/decode1a.f b/libm65/decode1a.f index 96831ad5c..0a6d8bc75 100644 --- a/libm65/decode1a.f +++ b/libm65/decode1a.f @@ -1,6 +1,6 @@ subroutine decode1a(dd,newdat,f0,nflip,mode65,nfsample,xpol, + mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi,ndphi,iloop, - + nutc,nkhz,ndf,ipol,sync2,a,dt,pol,nkv,nhist,nsum,nsave, + + nutc,nkhz,ndf,ipol,ntol,sync2,a,dt,pol,nkv,nhist,nsum,nsave, + qual,decoded) ! Apply AFC corrections to a candidate JT65 signal, then decode it. @@ -134,14 +134,15 @@ if(nqd.eq.1 .and. nkv.eq.0) then nhz=1000*nkhz + ndf - if(nutc.ne.nutc0 .or. abs(nhz-nhz0).ge.1000) syncbest=0. !### 1000 ?? + ihzdiff=min(500,ntol) + if(nutc.ne.nutc0 .or. abs(nhz-nhz0).ge.ihzdiff) syncbest=0. if(sync2.gt.syncbest) then nsave=nsave+1 nsave=mod(nsave-1,64)+1 npol=nint(57.296*pol) xdt=dt+0.8 - call s3avg(nsave,mode65,nutc,nhz,xdt,npol,s3,nsum, + call s3avg(nsave,mode65,nutc,nhz,xdt,npol,ntol,s3,nsum, + nkv,decoded) syncbest=sync2 nhz0=nhz diff --git a/libm65/map65a.f90 b/libm65/map65a.f90 index 38ebd7745..21694d4a5 100644 --- a/libm65/map65a.f90 +++ b/libm65/map65a.f90 @@ -206,8 +206,8 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & idf=nint(1000.0*(freq+0.5*(nfa+nfb)-foffset-(ikHz+nfshift))) call decode1a(dd,newdat,f00,nflip,mode65,nfsample,xpol, & mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi,ndphi, & - iloop,nutc,ikHz,idf,ipol,sync2,a,dt,pol,nkv,nhist, & - nsum,nsave,qual,decoded) + iloop,nutc,ikHz,idf,ipol,ntol,sync2,a,dt,pol,nkv, & + nhist,nsum,nsave,qual,decoded) dt=dt+0.8 !### empirical tweak call timer('decode1a',1) diff --git a/libm65/s3avg.f90 b/libm65/s3avg.f90 index 437286bef..555572464 100644 --- a/libm65/s3avg.f90 +++ b/libm65/s3avg.f90 @@ -1,4 +1,4 @@ -subroutine s3avg(nsave,mode65,nutc,nhz,xdt,npol,s3,nsum,nkv,decoded) +subroutine s3avg(nsave,mode65,nutc,nhz,xdt,npol,ntol,s3,nsum,nkv,decoded) ! Save the current synchronized spectra, s3(64,63), for possible ! decoding of average. @@ -18,7 +18,7 @@ subroutine s3avg(nsave,mode65,nutc,nhz,xdt,npol,s3,nsum,nkv,decoded) ihz=0 ipol=0 first=.false. - ihzdiff=100 + ihzdiff=min(100,ntol) dtdiff=0.2 endif diff --git a/mainwindow.cpp b/mainwindow.cpp index 7f0050f2f..1bdab40ba 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//-------------------------------------------------------------- MainWindow +//--------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h"