From 9544f60b5a52450542fafe047f48c3013dc59b97 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 14 Jul 2016 17:06:52 +0000 Subject: [PATCH] Implement "pick to decode" on the MSK144 horizontal waterfall. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6917 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/detectmsk144.f90 | 4 ++-- lib/detectmsk32.f90 | 4 ++-- lib/fast_decode.f90 | 7 +++++-- lib/msk144_decode.f90 | 6 +++--- mainwindow.cpp | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/detectmsk144.f90 b/lib/detectmsk144.f90 index d7e51af54..8263cbb9b 100644 --- a/lib/detectmsk144.f90 +++ b/lib/detectmsk144.f90 @@ -1,4 +1,4 @@ -subroutine detectmsk144(cbig,n,pchk_file,lines,nmessages,nutc,ntol) +subroutine detectmsk144(cbig,n,pchk_file,lines,nmessages,nutc,ntol,t00) use timer_module, only: timer parameter (NSPM=864, NPTS=3*NSPM, MAXSTEPS=1700, NFFT=NSPM, MAXCAND=12) @@ -168,7 +168,7 @@ subroutine detectmsk144(cbig,n,pchk_file,lines,nmessages,nutc,ntol) imid=times(ip)*fs if( imid .lt. NPTS/2 ) imid=NPTS/2 if( imid .gt. n-NPTS/2 ) imid=n-NPTS/2 - t0=times(ip) + t0=times(ip) + t00 cdat=cbig(imid-NPTS/2+1:imid+NPTS/2) ferr=ferrs(ip) nsnr=2*nint(snrs(ip)/2.0) diff --git a/lib/detectmsk32.f90 b/lib/detectmsk32.f90 index a9fbaa246..4e1263b51 100644 --- a/lib/detectmsk32.f90 +++ b/lib/detectmsk32.f90 @@ -1,4 +1,4 @@ -subroutine detectmsk32(cbig,n,mycall,partnercall,lines,nmessages,nutc,ntol) +subroutine detectmsk32(cbig,n,mycall,partnercall,lines,nmessages,nutc,ntol,t00) use timer_module, only: timer parameter (NSPM=192, NPTS=3*NSPM, MAXSTEPS=7500, NFFT=3*NSPM, MAXCAND=40) @@ -205,7 +205,7 @@ subroutine detectmsk32(cbig,n,mycall,partnercall,lines,nmessages,nutc,ntol) imid=times(ip)*fs if( imid .lt. NPTS/2 ) imid=NPTS/2 if( imid .gt. n-NPTS/2 ) imid=n-NPTS/2 - t0=times(ip) + t0=times(ip) + t00 cdat=cbig(imid-NPTS/2+1:imid+NPTS/2) ferr=ferrs(ip) nsnr=2*nint(snrs(ip)/2.0) diff --git a/lib/fast_decode.f90 b/lib/fast_decode.f90 index b72d9c0de..f00d93000 100644 --- a/lib/fast_decode.f90 +++ b/lib/fast_decode.f90 @@ -38,8 +38,11 @@ subroutine fast_decode(id2,narg,bShMsgs,line,pchk_file,mycall_12,hiscall_12) call jtmsk_decode(id2,narg,line) go to 900 else if(nmode.eq.104) then - call msk144_decode(id2,ndat0,nutc,0,pchk_file,mycall,hiscall,bShMsgs, & - ntol,line) + ia=max(1,nint(t0*12000.0)) + ib=min(ndat0,nint(t1*12000.0)) + nz=ib-ia+1 + call msk144_decode(id2(ia),nz,nutc,0,pchk_file,mycall,hiscall,bShMsgs, & + ntol,t0,line) go to 900 endif diff --git a/lib/msk144_decode.f90 b/lib/msk144_decode.f90 index 781f25cb2..a9f17577c 100644 --- a/lib/msk144_decode.f90 +++ b/lib/msk144_decode.f90 @@ -1,5 +1,5 @@ subroutine msk144_decode(id2,npts,nutc,nprint,pchk_file,mycall,hiscall, & - bShMsgs,ntol,line) + bShMsgs,ntol,t0,line) ! Calls the experimental decoder for MSK 72ms/16ms messages @@ -32,7 +32,7 @@ subroutine msk144_decode(id2,npts,nutc,nprint,pchk_file,mycall,hiscall, & n=log(float(npts))/log(2.0) + 1.0 nfft=min(2**n,1024*1024) call analytic(d,npts,nfft,c) !Convert to analytic signal and filter - call detectmsk144(c,npts,pchk_file,line,nline,nutc,ntol) + call detectmsk144(c,npts,pchk_file,line,nline,nutc,ntol,t0) if( nprint .ne. 0 ) then do i=1,nline write(*,'(a80)') line(i) @@ -41,7 +41,7 @@ subroutine msk144_decode(id2,npts,nutc,nprint,pchk_file,mycall,hiscall, & if(nline.eq.0 .and. bShMsgs) then - call detectmsk32(c,npts,mycall,hiscall,line,nline,nutc,ntol) + call detectmsk32(c,npts,mycall,hiscall,line,nline,nutc,ntol,t0) if( nprint .ne. 0 ) then do i=1,nline write(*,'(a80)') line(i) diff --git a/mainwindow.cpp b/mainwindow.cpp index dad057747..6a8f98dbd 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5661,7 +5661,7 @@ void MainWindow::setRig () void MainWindow::fastPick(int x0, int x1, int y) { - if(m_mode!="ISCAT") return; + if(m_mode!="ISCAT" and m_mode!="MSK144") return; if(!m_decoderBusy) { dec_data.params.newdat=0; dec_data.params.nagain=1;