Added routine "chkss2" to test sync vector for sanity before attenpting

Fano decode.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3270 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-05-15 15:17:36 +00:00
parent 85af134fd1
commit bd103459f1
7 changed files with 99 additions and 36 deletions

View File

@ -33,7 +33,7 @@ OBJS1 = pctile.o graycode.o sort.o ssort.o \
fil3.o redsync.o decoder.o grid2n.o n2grid.o timer.o \ fil3.o redsync.o decoder.o grid2n.o n2grid.o timer.o \
softsym.o getlags.o afc9.o fchisq.o twkfreq.o downsam9.o \ softsym.o getlags.o afc9.o fchisq.o twkfreq.o downsam9.o \
peakdt9.o symspec2.o stdmsg.o morse.o azdist.o geodist.o \ peakdt9.o symspec2.o stdmsg.o morse.o azdist.o geodist.o \
rig_control.o fillcom.o rig_control.o fillcom.o chkss2.o zplot9.o
libjt9.a: $(OBJS1) libjt9.a: $(OBJS1)
ar cr libjt9.a $(OBJS1) ar cr libjt9.a $(OBJS1)

23
lib/chkss2.f90 Normal file
View File

@ -0,0 +1,23 @@
subroutine chkss2(ss2,schk)
real ss2(0:8,85)
real s(0:8,85)
real s1(0:5)
include 'jt9sync.f90'
ave=sum(ss2)/(9*85)
s=ss2/ave-1.0
! call zplot9(s)
s1=0.
do lag=0,5
do i=1,16
j=ii(i)+lag
if(j.le.85) s1(lag)=s1(lag) + s(0,j)
enddo
enddo
schk=s1(0)/16.0
return
end subroutine chkss2

View File

@ -126,10 +126,11 @@ subroutine decoder(ss,c0,nstandalone)
call timer('softsym ',0) call timer('softsym ',0)
fpk=1000.0 + df3*(i-1) fpk=1000.0 + df3*(i-1)
call softsym(c0,npts8,nsps8,newdat,fpk,syncpk,snrdb,xdt,freq, & call softsym(c0,npts8,nsps8,newdat,fpk,syncpk,snrdb,xdt,freq, &
drift,i1SoftSymbols) drift,schk,i1SoftSymbols)
call timer('softsym ',1) call timer('softsym ',1)
if(schk.ge.3.0) then
call timer('decode9 ',0) call timer('decode9 ',0)
call decode9(i1SoftSymbols,limit,nlim,msg) call decode9(i1SoftSymbols,limit,nlim,msg)
call timer('decode9 ',1) call timer('decode9 ',1)
@ -141,8 +142,8 @@ subroutine decoder(ss,c0,nstandalone)
nsnr=nint(snrdb) nsnr=nint(snrdb)
ndrift=nint(drift/df3) ndrift=nint(drift/df3)
write(38,3002) nutc,nsnr,i,freq,ccfred(i),nlim,msg write(38,3002) nutc,nsnr,i,freq,ccfred(i),schk,nlim,msg
3002 format(i4.4,i5,i6,2f8.1,i9,2x,a22) 3002 format(i4.4,i5,i6,f8.1,2f6.1,i9,2x,a22)
if(msg.ne.' ') then if(msg.ne.' ') then
if(nqd.eq.0) ndecodes0=ndecodes0+1 if(nqd.eq.0) ndecodes0=ndecodes0+1
@ -153,8 +154,8 @@ subroutine decoder(ss,c0,nstandalone)
! write(14,1014) nutc,nsync,nsnr,xdt,freq,ndrift,ccfred(i),nlim,msg ! write(14,1014) nutc,nsync,nsnr,xdt,freq,ndrift,ccfred(i),nlim,msg
!1014 format(i4.4,i4,i5,f6.1,f8.0,i4,f9.1,i9,3x,a22) !1014 format(i4.4,i4,i5,f6.1,f8.0,i4,f9.1,i9,3x,a22)
iaa=max(1,i-3) iaa=max(1,i-1)
ibb=min(NSMAX,i+11) ibb=min(NSMAX,i+22)
fgood=f fgood=f
nsynced=1 nsynced=1
ndecoded=1 ndecoded=1
@ -162,6 +163,9 @@ subroutine decoder(ss,c0,nstandalone)
done(iaa:ibb)=.true. done(iaa:ibb)=.true.
call flush(6) call flush(6)
endif endif
else
write(38,3002) nutc,-99,i,freq,ccfred(i),schk,0
endif
endif endif
enddo enddo
call flush(6) call flush(6)

View File

@ -1,5 +1,5 @@
subroutine softsym(c0,npts8,nsps8,newdat,fpk,syncpk,snrdb,xdt,freq,drift, & subroutine softsym(c0,npts8,nsps8,newdat,fpk,syncpk,snrdb,xdt,freq,drift, &
i1SoftSymbols) schk,i1SoftSymbols)
! Compute the soft symbols ! Compute the soft symbols
@ -23,17 +23,18 @@ subroutine softsym(c0,npts8,nsps8,newdat,fpk,syncpk,snrdb,xdt,freq,drift, &
fsample=1500.0/ndown fsample=1500.0/ndown
a=0. a=0.
call afc9(c3,nz3,fsample,a,syncpk) !Find deltaF, fDot, fDDot call afc9(c3,nz3,fsample,a,syncpk) !Find deltaF, fDot, fDDot
freq=fpk - a(1)
drift=-2.0*a(2)
call twkfreq(c3,c5,nz3,fsample,a) !Correct for deltaF, fDot, fDDot call twkfreq(c3,c5,nz3,fsample,a) !Correct for deltaF, fDot, fDDot
! Compute soft symbols (in scrambled order) ! Compute soft symbols (in scrambled order)
call symspec2(c5,nz3,nsps8,nspsd,fsample,snrdb,i1SoftSymbolsScrambled) call symspec2(c5,nz3,nsps8,nspsd,fsample,freq,drift,snrdb,schk, &
i1SoftSymbolsScrambled)
if(snrdb.lt.-99.0) return
! Remove interleaving ! Remove interleaving
call interleave9(i1SoftSymbolsScrambled,-1,i1SoftSymbols) call interleave9(i1SoftSymbolsScrambled,-1,i1SoftSymbols)
freq=fpk - a(1)
drift=-2.0*a(2)
return return
end subroutine softsym end subroutine softsym

View File

@ -1,4 +1,5 @@
subroutine symspec2(c5,nz3,nsps8,nspsd,fsample,snrdb,i1SoftSymbolsScrambled) subroutine symspec2(c5,nz3,nsps8,nspsd,fsample,freq,drift,snrdb,schk, &
i1SoftSymbolsScrambled)
! Compute soft symbols from the final downsampled data ! Compute soft symbols from the final downsampled data
@ -33,6 +34,11 @@ subroutine symspec2(c5,nz3,nsps8,nspsd,fsample,snrdb,i1SoftSymbolsScrambled)
enddo enddo
enddo enddo
!###
! write(30) freq,drift,ss2
! call flush(30)
call chkss2(ss2,schk)
if(schk.lt.3.0) go to 900
!### !###
ss=0. ss=0.
sig=0. sig=0.
@ -81,5 +87,5 @@ subroutine symspec2(c5,nz3,nsps8,nspsd,fsample,snrdb,i1SoftSymbolsScrambled)
enddo enddo
enddo enddo
return 900 return
end subroutine symspec2 end subroutine symspec2

29
lib/zplot9.f90 Normal file
View File

@ -0,0 +1,29 @@
subroutine zplot9(s)
real s(0:8,85)
character*1 line(85),mark(0:6)
data mark/' ',' ','.','-','+','X','$'/
include 'jt9sync.f90'
do j=8,0,-1
do i=1,85
n=(s(j,i))
if(n.lt.0) n=0
if(n.gt.6) n=6
line(i)=mark(n)
enddo
write(32,1010) j,line
1010 format(i1,1x,85a1)
enddo
do i=1,85
line(i)=' '
if(isync(i).eq.1) line(i)='@'
enddo
write(32,1015)
1015 format(87('-'))
write(32,1020) line
1020 format(2x,85a1)
write(32,1015)
return
end subroutine zplot9

View File

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