mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-28 12:22:32 -04:00
Bring standalone behavior of jt9(.exe) closer to that of its
behavior when using WSJT-X shared memory. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3176 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
2f5631e87f
commit
39f7b5b65e
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
subroutine decoder(ss,c0)
|
subroutine decoder(ss,c0,nstandalone)
|
||||||
|
|
||||||
! Decoder for JT9.
|
! Decoder for JT9.
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ subroutine decoder(ss,c0)
|
|||||||
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)
|
||||||
|
|
||||||
sync=(syncpk+1)/4.0
|
sync=(syncpk+1)/4.0
|
||||||
if(sync.lt.0.0 .or. snrdb.lt.dblim-2.0) sync=0.0
|
if(sync.lt.0.0 .or. snrdb.lt.dblim-2.0) sync=0.0
|
||||||
nsync=sync
|
nsync=sync
|
||||||
@ -136,8 +136,8 @@ subroutine decoder(ss,c0)
|
|||||||
if(msg.ne.' ') then
|
if(msg.ne.' ') then
|
||||||
write(*,fmt) nutc,nsync,nsnr,xdt,freq,ndrift,msg
|
write(*,fmt) nutc,nsync,nsnr,xdt,freq,ndrift,msg
|
||||||
write(13,fmt) nutc,nsync,nsnr,xdt,freq,ndrift,msg
|
write(13,fmt) nutc,nsync,nsnr,xdt,freq,ndrift,msg
|
||||||
! 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-3)
|
||||||
ibb=min(NSMAX,i+11)
|
ibb=min(NSMAX,i+11)
|
||||||
fgood=f
|
fgood=f
|
||||||
@ -157,7 +157,7 @@ subroutine decoder(ss,c0)
|
|||||||
1010 format('<DecodeFinished>',2i4)
|
1010 format('<DecodeFinished>',2i4)
|
||||||
call flush(6)
|
call flush(6)
|
||||||
close(13)
|
close(13)
|
||||||
! call flush(14)
|
call flush(14)
|
||||||
|
|
||||||
call timer('decoder ',1)
|
call timer('decoder ',1)
|
||||||
if(nstandalone.eq.0) call timer('decoder ',101)
|
if(nstandalone.eq.0) call timer('decoder ',101)
|
||||||
|
58
lib/jt9.f90
58
lib/jt9.f90
@ -65,7 +65,7 @@ program jt9
|
|||||||
2 nsps=0
|
2 nsps=0
|
||||||
if(ntrperiod.eq.1) then
|
if(ntrperiod.eq.1) then
|
||||||
nsps=6912
|
nsps=6912
|
||||||
nzhsym=181
|
nzhsym=173
|
||||||
else if(ntrperiod.eq.2) then
|
else if(ntrperiod.eq.2) then
|
||||||
nsps=15360
|
nsps=15360
|
||||||
nzhsym=178
|
nzhsym=178
|
||||||
@ -115,64 +115,12 @@ program jt9
|
|||||||
enddo
|
enddo
|
||||||
|
|
||||||
10 close(10)
|
10 close(10)
|
||||||
iz=1000.0/df3
|
call fillcom(nutc0)
|
||||||
nutc=nutc0
|
call decoder(ss,c0,1)
|
||||||
|
|
||||||
call timer('sync9 ',0)
|
|
||||||
call sync9(ss,nzhsym,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipk) !Get sync, freq
|
|
||||||
call timer('sync9 ',1)
|
|
||||||
|
|
||||||
fgood=0.
|
|
||||||
nsps8=nsps/8
|
|
||||||
df8=1500.0/nsps8
|
|
||||||
sbest=0.
|
|
||||||
do i=ia,ib
|
|
||||||
f=(i-1)*df3
|
|
||||||
if((i.eq.ipk .or. ccfred(i).ge.3.0) .and. f.gt.fgood+10.0*df8) then
|
|
||||||
|
|
||||||
call timer('decode9a',0)
|
|
||||||
fpk=1000.0 + df3*(i-1)
|
|
||||||
c1(1:npts8)=conjg(c0(1:npts8))
|
|
||||||
call decode9a(c1,npts8,nsps8,fpk,syncpk,snrdb,xdt,freq, &
|
|
||||||
drift,i1SoftSymbols)
|
|
||||||
call timer('decode9a',1)
|
|
||||||
|
|
||||||
call timer('decode9 ',0)
|
|
||||||
call decode9(i1SoftSymbols,limit,nlim,msg)
|
|
||||||
call timer('decode9 ',1)
|
|
||||||
|
|
||||||
sync=(syncpk-1.0)/2.0
|
|
||||||
if(sync.lt.0.0 .or. snrdb.lt.dblim-2.0) sync=0.0
|
|
||||||
nsync=sync
|
|
||||||
if(nsync.gt.10) nsync=10
|
|
||||||
nsnr=nint(snrdb)
|
|
||||||
|
|
||||||
if(sync.gt.sbest .and. fgood.eq.0.0) then
|
|
||||||
sbest=sync
|
|
||||||
write(line,1010) nutc,nsync,nsnr,xdt,freq,drift
|
|
||||||
if(nsync.gt.0) nsynced=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
if(msg.ne.' ') then
|
|
||||||
write(*,1010) nutc,nsync,nsnr,xdt,freq,drift,msg
|
|
||||||
1010 format(i4.4,i4,i5,f6.1,f8.2,f6.2,3x,a22)
|
|
||||||
fgood=f
|
|
||||||
nsynced=1
|
|
||||||
ndecoded=1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
|
|
||||||
if(fgood.eq.0.0) then
|
|
||||||
write(*,1020) line
|
|
||||||
1020 format(a33)
|
|
||||||
endif
|
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
call timer('jt9 ',1)
|
call timer('jt9 ',1)
|
||||||
call timer('jt9 ',101)
|
call timer('jt9 ',101)
|
||||||
! call ftnquit
|
|
||||||
go to 999
|
go to 999
|
||||||
|
|
||||||
998 print*,'Cannot open file:'
|
998 print*,'Cannot open file:'
|
||||||
|
@ -85,7 +85,7 @@ subroutine jt9c(ss,savg,c0,id2,nparams0)
|
|||||||
npatience=1
|
npatience=1
|
||||||
|
|
||||||
call flush(6)
|
call flush(6)
|
||||||
if(sum(nparams).ne.0) call decoder(ss,c0)
|
if(sum(nparams).ne.0) call decoder(ss,c0,0)
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine jt9c
|
end subroutine jt9c
|
||||||
|
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user