From d031d507b58420695eeb2d9a0d5b33b16c35aa6d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 3 Oct 2012 13:26:52 +0000 Subject: [PATCH] Some cleanup and re-arrangement. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2633 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- libm65/decode9.f90 | 2 +- libm65/jt9.f90 | 7 +++++-- libm65/spec9.f90 | 41 +---------------------------------------- mainwindow.cpp | 2 +- 4 files changed, 8 insertions(+), 44 deletions(-) diff --git a/libm65/decode9.f90 b/libm65/decode9.f90 index c415b5dc4..fa52545b5 100644 --- a/libm65/decode9.f90 +++ b/libm65/decode9.f90 @@ -35,7 +35,7 @@ subroutine decode9(i1SoftSymbols,msg) msg=' ' nbits=72 ndelta=17 - limit=1000 + limit=10000 call fano232(i1SoftSymbols,nbits+31,mettab,ndelta,limit,i1DecodedBytes, & ncycles,metric,ierr,maxmetric,maxnp) diff --git a/libm65/jt9.f90 b/libm65/jt9.f90 index 4924a39ba..9d95a4fc2 100644 --- a/libm65/jt9.f90 +++ b/libm65/jt9.f90 @@ -12,6 +12,8 @@ program jt9 integer*4 ihdr(11) real*4 s(NSMAX) logical*1 lstrong(0:1023) + integer*1 i1SoftSymbols(207) + character*22 msg integer*2 id2 complex c0 common/jt8com/id2(NMAX),ss(184,NSMAX),savg(NSMAX),c0(NDMAX), & @@ -111,8 +113,9 @@ program jt9 nutc=nutc0 nstandalone=1 call sync9(ss,tstep,f0a,df3,lagpk,fpk) - call spec9(c0,npts8,nsps,f0a,lagpk,fpk) -! call decode0(dd,ss,savg,nstandalone,nfsample) + call spec9(c0,npts8,nsps,f0a,lagpk,fpk,i1SoftSymbols) + call decode9(i1SoftSymbols,msg) + print*,msg enddo call timer('jt9 ',1) diff --git a/libm65/spec9.f90 b/libm65/spec9.f90 index c341a8b6f..5f3032cd4 100644 --- a/libm65/spec9.f90 +++ b/libm65/spec9.f90 @@ -1,4 +1,4 @@ -subroutine spec9(c0,npts8,nsps,f0a,lagpk,fpk) +subroutine spec9(c0,npts8,nsps,f0a,lagpk,fpk,i1SoftSymbols) parameter (MAXFFT=31500) complex c0(0:npts8-1) @@ -88,46 +88,7 @@ subroutine spec9(c0,npts8,nsps,f0a,lagpk,fpk) enddo enddo - ibit=0 - do i=1,207 - if(i1SoftSymbolsScrambled(i).lt.0) ibit(i)=1 - enddo - -! Get the metric table - bias=0.37 !To be optimized, in decoder program - scale=10 ! ... ditto ... - open(19,file='met8.21',status='old') - - do i=0,255 - read(19,*) x00,x0,x1 - mettab(i,0)=nint(scale*(x0-bias)) - mettab(i,1)=nint(scale*(x1-bias)) !### Check range, etc. ### - enddo - close(19) - nbits=72 - ndelta=17 - limit=1000 - call interleave9(i1SoftSymbolsScrambled,-1,i1SoftSymbols) - call fano232(i1SoftSymbols,nbits+31,mettab,ndelta,limit,t1,ncycles, & - metric,ierr,maxmetric,maxnp) - - nbytes=(nbits+7)/8 - do i=1,nbytes - n=t1(i) - t4(i)=iand(n,255) - enddo - call unpackbits(t4,nbytes,8,tmp) - call packbits(tmp,12,6,t4) - do i=1,12 - if(t4(i).lt.128) t1(i)=t4(i) - if(t4(i).ge.128) t1(i)=t4(i)-256 - enddo - do i=1,12 - t4(i)=t1(i) - enddo - call unpackmsg(t4,msg) !Unpack decoded msg - print*,msg return end subroutine spec9 diff --git a/mainwindow.cpp b/mainwindow.cpp index 48d16902e..a120db1b3 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//-------------------------------------------------------------- MainWindow +//------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h"