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
This commit is contained in:
Joe Taylor 2012-10-03 13:26:52 +00:00
parent 247452dfab
commit d031d507b5
4 changed files with 8 additions and 44 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -1,4 +1,4 @@
//-------------------------------------------------------------- MainWindow
//------------------------------------------------------------- MainWindow
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "devsetup.h"