Believe I've fixed the "ihsym-3" bug. Needs thorough testing!!

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2720 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-11-12 21:06:31 +00:00
parent 335536b6ec
commit 64c02c432c
3 changed files with 11 additions and 20 deletions

View File

@ -45,6 +45,7 @@ program jt9
nb=0
nbslider=100
limit=20000
ndiskdat=1
do ifile=ifile1,nargs
call getarg(ifile,infile)
@ -69,7 +70,7 @@ program jt9
npts=(60*ntrperiod-6)*12000
! do i=1,npts
! id2(i)=100.0*sin(6.283185307*1046.875*i/12000.0)
! id2(i)=100.0*sin(6.283185307*1600.0*i/12000.0)
! enddo
do iblk=1,npts/kstep
@ -88,12 +89,9 @@ program jt9
10 close(10)
iz=1000.0/df3
! Now do the decoding
nutc=nutc0
! Get sync, approx freq
call sync9(ss,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipk)
call sync9(ss,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipk) !Get sync, freq
fgood=0.
df8=1500.0/(nsps/8)
@ -103,8 +101,6 @@ program jt9
if((i.eq.ipk .or. ccfred(i).ge.3.0) .and. f.gt.fgood+10.0*df8) then
call spec9(c0,npts8,nsps,f,fpk,xdt,snrdb,i1SoftSymbols)
call decode9(i1SoftSymbols,limit,nlim,msg)
! print*,msg
! snr=10.0*log10(ccfred(i)) - 10.0*log10(2500.0/df3) + 2.0
snr=snrdb
sync=ccfred(i) - 2.0
if(sync.lt.0.0) sync=0.0

View File

@ -58,7 +58,8 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
endif
if(k.lt.k0) then
ja=-3*jstep
! ja=-3*jstep
ja=0
ssum=0.
ihsym=0
k1=0
@ -84,7 +85,6 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
nblks=(k-k1)/kstep1
gain=10.0**(0.05*ingain)
do nblk=1,nblks
j=k1+1
do i=1,NFFT1
x0(i)=gain*id2(k1+i)
enddo
@ -102,20 +102,18 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
npts8=k8
ja=ja+jstep !Index of first sample
nsum=nblks*kstep1 - nzap
!###
! if(nzap/178.lt.50 .and. (ndiskdat.eq.0 .or. ihsym.lt.280)) then
if(nsum.le.0) nsum=1
rms=sqrt(px/nsum)
! endif
pxdb=0.
if(rms.gt.0.0) pxdb=20.0*log10(rms)
if(pxdb.gt.60.0) pxdb=60.0
!###
! if(ja.lt.0 .or. npts8.lt.ja+nfft3) go to 999
if(ja.gt.0) then
do i=0,nfft3-1 !Copy data into cx
cx(i)=c0(ja+i+1)
cx(i)=0.
j=ja+i-(nfft3-1)
if(j.ge.1) cx(i)=c0(j)
enddo
if(ihsym.lt.184) ihsym=ihsym+1
@ -151,9 +149,5 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
savg(1:iz)=fac1*ssum(1:iz)
call redsync(ss,ntrperiod,ihsym,iz,red)
! write(77,3001) ihsym,ave0,xmed0,ave1,xmed1
!3001 format(i5,4f15.3)
! call flush(77)
return
end subroutine symspec

View File

@ -361,7 +361,8 @@ void MainWindow::dataSink(int k)
}
// This is a bit strange. Why do we need the "-3" ???
if(ihsym == m_hsymStop-3) {
// if(ihsym == m_hsymStop-3) {
if(ihsym == m_hsymStop) {
m_dataAvailable=true;
jt9com_.npts8=(ihsym*m_nsps)/16;
jt9com_.newdat=1;