mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 20:58:55 -05:00
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:
parent
335536b6ec
commit
64c02c432c
10
lib/jt9.f90
10
lib/jt9.f90
@ -45,6 +45,7 @@ program jt9
|
|||||||
nb=0
|
nb=0
|
||||||
nbslider=100
|
nbslider=100
|
||||||
limit=20000
|
limit=20000
|
||||||
|
ndiskdat=1
|
||||||
|
|
||||||
do ifile=ifile1,nargs
|
do ifile=ifile1,nargs
|
||||||
call getarg(ifile,infile)
|
call getarg(ifile,infile)
|
||||||
@ -69,7 +70,7 @@ program jt9
|
|||||||
npts=(60*ntrperiod-6)*12000
|
npts=(60*ntrperiod-6)*12000
|
||||||
|
|
||||||
! do i=1,npts
|
! 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
|
! enddo
|
||||||
|
|
||||||
do iblk=1,npts/kstep
|
do iblk=1,npts/kstep
|
||||||
@ -88,12 +89,9 @@ program jt9
|
|||||||
|
|
||||||
10 close(10)
|
10 close(10)
|
||||||
iz=1000.0/df3
|
iz=1000.0/df3
|
||||||
|
|
||||||
! Now do the decoding
|
|
||||||
nutc=nutc0
|
nutc=nutc0
|
||||||
|
|
||||||
! Get sync, approx freq
|
call sync9(ss,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipk) !Get sync, freq
|
||||||
call sync9(ss,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipk)
|
|
||||||
|
|
||||||
fgood=0.
|
fgood=0.
|
||||||
df8=1500.0/(nsps/8)
|
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
|
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 spec9(c0,npts8,nsps,f,fpk,xdt,snrdb,i1SoftSymbols)
|
||||||
call decode9(i1SoftSymbols,limit,nlim,msg)
|
call decode9(i1SoftSymbols,limit,nlim,msg)
|
||||||
! print*,msg
|
|
||||||
! snr=10.0*log10(ccfred(i)) - 10.0*log10(2500.0/df3) + 2.0
|
|
||||||
snr=snrdb
|
snr=snrdb
|
||||||
sync=ccfred(i) - 2.0
|
sync=ccfred(i) - 2.0
|
||||||
if(sync.lt.0.0) sync=0.0
|
if(sync.lt.0.0) sync=0.0
|
||||||
|
@ -58,7 +58,8 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if(k.lt.k0) then
|
if(k.lt.k0) then
|
||||||
ja=-3*jstep
|
! ja=-3*jstep
|
||||||
|
ja=0
|
||||||
ssum=0.
|
ssum=0.
|
||||||
ihsym=0
|
ihsym=0
|
||||||
k1=0
|
k1=0
|
||||||
@ -84,7 +85,6 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
|
|||||||
nblks=(k-k1)/kstep1
|
nblks=(k-k1)/kstep1
|
||||||
gain=10.0**(0.05*ingain)
|
gain=10.0**(0.05*ingain)
|
||||||
do nblk=1,nblks
|
do nblk=1,nblks
|
||||||
j=k1+1
|
|
||||||
do i=1,NFFT1
|
do i=1,NFFT1
|
||||||
x0(i)=gain*id2(k1+i)
|
x0(i)=gain*id2(k1+i)
|
||||||
enddo
|
enddo
|
||||||
@ -102,20 +102,18 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
|
|||||||
npts8=k8
|
npts8=k8
|
||||||
ja=ja+jstep !Index of first sample
|
ja=ja+jstep !Index of first sample
|
||||||
nsum=nblks*kstep1 - nzap
|
nsum=nblks*kstep1 - nzap
|
||||||
!###
|
|
||||||
! if(nzap/178.lt.50 .and. (ndiskdat.eq.0 .or. ihsym.lt.280)) then
|
|
||||||
if(nsum.le.0) nsum=1
|
if(nsum.le.0) nsum=1
|
||||||
rms=sqrt(px/nsum)
|
rms=sqrt(px/nsum)
|
||||||
! endif
|
|
||||||
pxdb=0.
|
pxdb=0.
|
||||||
if(rms.gt.0.0) pxdb=20.0*log10(rms)
|
if(rms.gt.0.0) pxdb=20.0*log10(rms)
|
||||||
if(pxdb.gt.60.0) pxdb=60.0
|
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
|
if(ja.gt.0) then
|
||||||
do i=0,nfft3-1 !Copy data into cx
|
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
|
enddo
|
||||||
|
|
||||||
if(ihsym.lt.184) ihsym=ihsym+1
|
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)
|
savg(1:iz)=fac1*ssum(1:iz)
|
||||||
call redsync(ss,ntrperiod,ihsym,iz,red)
|
call redsync(ss,ntrperiod,ihsym,iz,red)
|
||||||
|
|
||||||
! write(77,3001) ihsym,ave0,xmed0,ave1,xmed1
|
|
||||||
!3001 format(i5,4f15.3)
|
|
||||||
! call flush(77)
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine symspec
|
end subroutine symspec
|
||||||
|
@ -361,7 +361,8 @@ void MainWindow::dataSink(int k)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This is a bit strange. Why do we need the "-3" ???
|
// 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;
|
m_dataAvailable=true;
|
||||||
jt9com_.npts8=(ihsym*m_nsps)/16;
|
jt9com_.npts8=(ihsym*m_nsps)/16;
|
||||||
jt9com_.newdat=1;
|
jt9com_.newdat=1;
|
||||||
|
Loading…
Reference in New Issue
Block a user