From 6ce5c09a1bdfda63cdaa441a1945e2f46a44104a Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 7 Sep 2012 14:21:34 +0000 Subject: [PATCH] Fix several minor bugs in the fast modes. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2565 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- getfile.cpp | 11 +++++++++-- libm65/ccf65.f90 | 3 ++- libm65/map65a.f90 | 2 ++ mainwindow.cpp | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/getfile.cpp b/getfile.cpp index 1568a4a91..5e569e147 100644 --- a/getfile.cpp +++ b/getfile.cpp @@ -47,8 +47,15 @@ void getfile(QString fname, bool xpol, int dbDgrd, int nfast) int i0=fname.indexOf(".tf2"); if(i0<0) i0=fname.indexOf(".iq"); datcom_.nutc=0; - if(i0>0) datcom_.nutc=100*fname.mid(i0-4,2).toInt() + - fname.mid(i0-2,2).toInt(); + if(i0>0) { + if(fname.mid(i0-5,1)=="_") { + datcom_.nutc=100*fname.mid(i0-4,2).toInt() + + fname.mid(i0-2,2).toInt(); + } else { + datcom_.nutc=100*fname.mid(i0-6,2).toInt() + + fname.mid(i0-4,2).toInt(); + } + } } } diff --git a/libm65/ccf65.f90 b/libm65/ccf65.f90 index e4bbd8b2e..fc9fb94d8 100644 --- a/libm65/ccf65.f90 +++ b/libm65/ccf65.f90 @@ -37,6 +37,7 @@ subroutine ccf65(ss,nhsym,nfast,ssmax,sync1,ipol1,jpz,dt1,flipk, & pr(i)=0. pr2(i)=0. k=2*mod((i-1)/8,2)-1 + if(nfast.eq.2) k=2*mod((i-1)/16,2)-1 if(i.le.NH) pr2(i)=fac*k enddo do i=1,126 @@ -84,7 +85,7 @@ subroutine ccf65(ss,nhsym,nfast,ssmax,sync1,ipol1,jpz,dt1,flipk, & endif enddo - do lag=-8,7 !Check for best shorthand + do lag=-11,54 !Check for best shorthand ccf2=s2(lag+28) if(ccf2.gt.ccfbest2) then ccfbest2=ccf2 diff --git a/libm65/map65a.f90 b/libm65/map65a.f90 index a7e0af72c..85a08f79b 100644 --- a/libm65/map65a.f90 +++ b/libm65/map65a.f90 @@ -272,6 +272,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & ndf=nint(1000.0*(freq-foffset-(nkHz+nfshift))) nsync1=sync1 nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ### + if(nfast.eq.2) nsync2=nsync2 + 7 if(decoded(1:4).eq.'RO ' .or. decoded(1:4).eq.'RRR ' .or. & decoded(1:4).eq.'73 ') nsync2=nsync2-6 nwrite=nwrite+1 @@ -394,6 +395,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & ndf2=nint(a(3)) nsync1=sync1 nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ### + if(nfast.eq.2) nsync2=nsync2 + 7 if(decoded(1:4).eq.'RO ' .or. decoded(1:4).eq.'RRR ' .or. & decoded(1:4).eq.'73 ') nsync2=nsync2-6 if(nxant.ne.0) then diff --git a/mainwindow.cpp b/mainwindow.cpp index 1fd7ce396..70822fd4b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//------------------------------------------------------------ MainWindow +//------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h"