From 56e3638bc537b3d21ea230d7a9ea6527dc01848d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 25 Nov 2015 16:40:22 +0000 Subject: [PATCH] Increase the JT65 range of acceptable DT: now -2 to +5 s. Note that displayed DT values appear to be to low by 0.2 s -- they range from -2.2 s to +4.8 s, according to files generated by jt65sim. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6179 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/afc65b.f90 | 4 ---- lib/ccf2.f90 | 10 +++++----- lib/decode65a.f90 | 7 +++++-- lib/fchisq65.f90 | 2 +- lib/fillcom.f90 | 6 ++++++ lib/jt65sim.f90 | 12 +++++++----- lib/sync65.f90 | 4 ++-- lib/xcor.f90 | 2 +- 8 files changed, 27 insertions(+), 20 deletions(-) diff --git a/lib/afc65b.f90 b/lib/afc65b.f90 index c69effeda..a43f88abc 100644 --- a/lib/afc65b.f90 +++ b/lib/afc65b.f90 @@ -9,10 +9,6 @@ subroutine afc65b(cx,npts,fsample,nflip,a,ccfbest,dtbest) a(2)=0. a(3)=0. a(4)=0. -! deltaa(1)=2.0 -! deltaa(2)=2.0 -! deltaa(3)=2.0 -! deltaa(4)=0.05 deltaa(1)=2.0 deltaa(2)=2.0 deltaa(3)=1.0 diff --git a/lib/ccf2.f90 b/lib/ccf2.f90 index a8a3247e6..194608d18 100644 --- a/lib/ccf2.f90 +++ b/lib/ccf2.f90 @@ -1,7 +1,6 @@ subroutine ccf2(ss,nz,nflip,ccfbest,xlagpk) -! parameter (LAGMAX=60) - parameter (LAGMAX=200) + parameter (LAGMIN=-86,LAGMAX=258) real ss(nz) real ccf(-LAGMAX:LAGMAX) integer npr(126) @@ -18,7 +17,7 @@ subroutine ccf2(ss,nz,nflip,ccfbest,xlagpk) save ccfbest=0. - lag1=-LAGMAX + lag1=LAGMIN lag2=LAGMAX do lag=lag1,lag2 s0=0. @@ -38,11 +37,12 @@ subroutine ccf2(ss,nz,nflip,ccfbest,xlagpk) if(ccf(lag).gt.ccfbest) then ccfbest=ccf(lag) lagpk=lag + xlagpk=lagpk endif enddo if( lagpk.gt.-LAGMAX .and. lagpk.lt.LAGMAX) then - call peakup(ccf(lagpk-1),ccf(lagpk),ccf(lagpk+1),dx) - xlagpk=lagpk+dx + call peakup(ccf(lagpk-1),ccf(lagpk),ccf(lagpk+1),dx) + xlagpk=lagpk+dx endif return end subroutine ccf2 diff --git a/lib/decode65a.f90 b/lib/decode65a.f90 index d8a7ecb21..6457f2166 100644 --- a/lib/decode65a.f90 +++ b/lib/decode65a.f90 @@ -50,14 +50,17 @@ subroutine decode65a(dd,npts,newdat,nqd,f0,nflip,mode65,ntrials, & nsym=126 nfft=512 j=int(dtbest*1378.125) - if(j.lt.0) j=0 c5a=cmplx(0.0,0.0) call timer('sh_ffts ',0) do k=1,nsym do i=1,nfft j=j+1 - if( j .le. NMAX/8 ) c5a(i)=cx(j) + if(j.ge.1 .and. j.le.NMAX/8) then + c5a(i)=cx(j) + else + c5a(i)=0. + endif enddo call four2a(c5a,nfft,1,1,1) do i=1,66 diff --git a/lib/fchisq65.f90 b/lib/fchisq65.f90 index a89a55232..4231dead1 100644 --- a/lib/fchisq65.f90 +++ b/lib/fchisq65.f90 @@ -60,7 +60,7 @@ real function fchisq65(cx,npts,fsample,nflip,a,ccfmax,dtmax) dtmax=xlagpk*dtstep endif fchisq65=-ccfmax - call timer('fchisq65',1) + return end function fchisq65 diff --git a/lib/fillcom.f90 b/lib/fillcom.f90 index 2d741b06f..3bc787ee8 100644 --- a/lib/fillcom.f90 +++ b/lib/fillcom.f90 @@ -23,6 +23,12 @@ subroutine fillcom(nutc0,ndepth0,nrxfreq,mode,tx9,flow,fsplit,fhigh) nzhsym=181 ndepth=ndepth0 dttol=3.0 + + n2pass=1 + nranera=8 + naggressive=10 + nrobust=0 + if (tx9) then ntxmode=9 else diff --git a/lib/jt65sim.f90 b/lib/jt65sim.f90 index 2c04ffece..4afd03cf6 100644 --- a/lib/jt65sim.f90 +++ b/lib/jt65sim.f90 @@ -28,9 +28,9 @@ program jt65sim 1,1,1,1,1,1/ nargs=iargc() - if(nargs.ne.5) then - print*,'Usage: jt65sim mode nsigs fspread SNR nfiles' - print*,'Example: jt65sim A 10 0.2 -24 1' + if(nargs.ne.6) then + print*,'Usage: jt65sim mode nsigs fspread SNR DT nfiles' + print*,'Example: jt65sim A 10 0.2 -24 0.0 1' print*,'Enter SNR = 0 to generate a range of SNRs.' go to 999 endif @@ -47,6 +47,8 @@ program jt65sim call getarg(4,arg) read(arg,*) snrdb !S/N in dB (2500 hz reference BW) call getarg(5,arg) + read(arg,*) xdt !Generated DT + call getarg(6,arg) read(arg,*) nfiles !Number of files rms=100. @@ -106,7 +108,7 @@ program jt65sim phi=0.d0 dphi=0.d0 - k=12000 !Start audio at t = 1.0 s + k=12000 + xdt*12000 !Start audio at t = xdt + 1.0 s isym0=-99 do i=1,npts !Add this signal into cdat() isym=nint(i/sps)+1 @@ -121,7 +123,7 @@ program jt65sim xphi=phi z=cmplx(cos(xphi),sin(xphi)) k=k+1 - cdat(k)=cdat(k) + sig*z + if(k.ge.1) cdat(k)=cdat(k) + sig*z enddo enddo diff --git a/lib/sync65.f90 b/lib/sync65.f90 index b602e8075..3e9b503c3 100644 --- a/lib/sync65.f90 +++ b/lib/sync65.f90 @@ -2,7 +2,7 @@ subroutine sync65(ss,nfa,nfb,nhsym,ca,ncand,nrobust) parameter (NSZ=3413,NFFT=8192,MAXCAND=300) real ss(322,NSZ) - real ccfblue(-5:540) !CCF with pseudorandom sequence + real ccfblue(-11:540) !CCF with pseudorandom sequence real ccfred(NSZ) !Peak of ccfblue, as function of freq type candidate @@ -18,7 +18,7 @@ subroutine sync65(ss,nfa,nfb,nhsym,ca,ncand,nrobust) df=12000.0/NFFT !df = 12000.0/16384 = 0.732 Hz ia=max(2,nint(nfa/df)) ib=min(NSZ-1,nint(nfb/df)) - lag1=-5 + lag1=-11 lag2=59 nsym=126 !! thresh0=5.5 diff --git a/lib/xcor.f90 b/lib/xcor.f90 index 6a0280b02..b09bcc6e5 100644 --- a/lib/xcor.f90 +++ b/lib/xcor.f90 @@ -9,7 +9,7 @@ subroutine xcor(ss,ipk,nsteps,nsym,lag1,lag2,ccf,ccf0,lagpk,flip,fdot,nrobust) parameter (NSMAX=322) !Max number of half-symbol steps real ss(NSMAX,NHMAX) !2d spectrum, stepped by half-symbols real a(NSMAX) - real ccf(-5:540) + real ccf(-11:540) include 'prcom.f90' data lagmin/0/ !Silence g77 warning save