From a5c9ec137c837c24fea6133bc7b12969902f70e3 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 7 Sep 2012 16:30:43 +0000 Subject: [PATCH] Empirical corrections to measured DT. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2567 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- libm65/ccf65.f90 | 1 - libm65/decode1a.f | 5 +++-- libm65/map65a.f90 | 1 - libm65/mapsim.f90 | 12 +++++++----- mainwindow.cpp | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/libm65/ccf65.f90 b/libm65/ccf65.f90 index fc9fb94d8..a2a77b444 100644 --- a/libm65/ccf65.f90 +++ b/libm65/ccf65.f90 @@ -108,7 +108,6 @@ subroutine ccf65(ss,nhsym,nfast,ssmax,sync1,ipol1,jpz,dt1,flipk, & enddo rms=sqrt(sq/49.0) sync1=ccfbest/rms - 4.0 -! dt1=(2.5 + lagpk*(2048.0/11025.0))/nfast dt1=lagpk*(2048.0/11025.0)/nfast - 2.5 ! Find base level for normalizing snr2. diff --git a/libm65/decode1a.f b/libm65/decode1a.f index c773bc784..4f2f69153 100644 --- a/libm65/decode1a.f +++ b/libm65/decode1a.f @@ -103,6 +103,7 @@ nfft=512/nfast j=(dt00+dtbest+2.685)*1378.125 + joff if(nfast.eq.2) j=j-1506 +! print*,'B',dt00,dtbest,j if(j.lt.0) j=0 call timer('sh_ffts ',0) @@ -141,7 +142,8 @@ call timer('dec65b ',0) call decode65b(s2,flip,mycall,hiscall,hisgrid,mode65,neme,ndepth, + nqd,nkv,nhist,qual,decoded,s3,sy) - dt=dt00 + dtbest + dt=dt00 + dtbest + 1.7 + if(nfast.eq.2) dt=dt00 + dtbest + 0.6 call timer('dec65b ',1) if(nqd.eq.1 .and. nkv.eq.0) then @@ -152,7 +154,6 @@ 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,ntol,s3,nsum, + nkv,decoded) diff --git a/libm65/map65a.f90 b/libm65/map65a.f90 index 85a08f79b..5d9e30150 100644 --- a/libm65/map65a.f90 +++ b/libm65/map65a.f90 @@ -212,7 +212,6 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, & xpol,mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi, & ndphi,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) if(km.lt.MAXMSG) km=km+1 diff --git a/libm65/mapsim.f90 b/libm65/mapsim.f90 index f01a8a3af..8b791f16f 100644 --- a/libm65/mapsim.f90 +++ b/libm65/mapsim.f90 @@ -13,8 +13,8 @@ program mapsim nargs=iargc() if(nargs.ne.9) then - print*,'Usage: mapsim level "message" mode f1 f2 nsigs pol SNR nfiles' - print*,'Example: 25 "CQ K1ABC FN42" B -22 33 20 45 -20 1' + print*,'Usage: mapsim DT "message" mode f1 f2 nsigs pol SNR nfiles' + print*,'Example: 2.5 "CQ K1ABC FN42" B -22 33 20 45 -20 1' print*,' ' print*,'Enter message = "" to use entries in msgs.txt.' print*,'Enter pol = -1 to generate a range of polarization angles.' @@ -23,8 +23,7 @@ program mapsim endif call getarg(1,arg) - read(arg,*) rmsdb !Average noise level in dB - rms=10.0**(0.05*rmsdb) + read(arg,*) dt0 !Time delay call getarg(2,msg0) message=msg0 !Transmitted message call getarg(3,mode) !JT65 sub-mode (A B C B2 C2) @@ -42,6 +41,8 @@ program mapsim call getarg(9,arg) read(arg,*) nfiles !Number of files + rmsdb=25. + rms=10.0**(0.05*rmsdb) fcenter=144.125d0 !Center frequency (MHz) fsample=96000.d0 !Sample rate (Hz) dt=1.d0/fsample !Sample interval (s) @@ -98,7 +99,8 @@ program mapsim 1020 format(i3,i4,f8.3,f7.1,i5,2x,a22) phi=0. - i0=fsample*(3.5d0+0.05d0*(isig-1)) +! i0=fsample*(3.5d0+0.05d0*(isig-1)) + i0=fsample*(1.d0 + dt0) do i=1,nwave phi=phi + dphi if(phi.lt.-twopi) phi=phi+twopi diff --git a/mainwindow.cpp b/mainwindow.cpp index c9dff6150..3a3c274f5 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//-------------------------------------------------------------- MainWindow +//--------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h"