mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-19 10:32:02 -05:00
Correct a scaling error in spec9. Should improve decoding significantly!
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2715 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
69ca8b20a7
commit
821bd120ca
Binary file not shown.
64
lib/jt9.f90
64
lib/jt9.f90
@ -11,7 +11,7 @@ program jt9
|
|||||||
parameter (NSMAX=22000) !Max length of saved spectra
|
parameter (NSMAX=22000) !Max length of saved spectra
|
||||||
integer*4 ihdr(11)
|
integer*4 ihdr(11)
|
||||||
real*4 s(NSMAX)
|
real*4 s(NSMAX)
|
||||||
real*4 red(NSMAX)
|
real*4 ccfred(NSMAX)
|
||||||
logical*1 lstrong(0:1023)
|
logical*1 lstrong(0:1023)
|
||||||
integer*1 i1SoftSymbols(207)
|
integer*1 i1SoftSymbols(207)
|
||||||
character*22 msg
|
character*22 msg
|
||||||
@ -37,11 +37,13 @@ program jt9
|
|||||||
|
|
||||||
nfa=1000
|
nfa=1000
|
||||||
nfb=2000
|
nfb=2000
|
||||||
ntol=500
|
! ntol=500
|
||||||
|
ntol=20
|
||||||
nfqso=1500
|
nfqso=1500
|
||||||
newdat=1
|
newdat=1
|
||||||
nb=0
|
nb=0
|
||||||
nbslider=100
|
nbslider=100
|
||||||
|
limit=20000
|
||||||
|
|
||||||
do ifile=ifile1,nargs
|
do ifile=ifile1,nargs
|
||||||
call getarg(ifile,infile)
|
call getarg(ifile,infile)
|
||||||
@ -75,8 +77,9 @@ program jt9
|
|||||||
nhsym=(k-2048)/kstep
|
nhsym=(k-2048)/kstep
|
||||||
if(nhsym.ge.1 .and. nhsym.ne.nhsym0) then
|
if(nhsym.ge.1 .and. nhsym.ne.nhsym0) then
|
||||||
! Emit signal readyForFFT
|
! Emit signal readyForFFT
|
||||||
call symspec(k,ntrperiod,nsps,nb,nbslider,pxdb, &
|
ingain=0
|
||||||
s,red,df3,ihsym,nzap,slimit,lstrong,c0,npts8)
|
call symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb, &
|
||||||
|
s,ccfred,df3,ihsym,nzap,slimit,lstrong,c0,npts8)
|
||||||
nhsym0=nhsym
|
nhsym0=nhsym
|
||||||
if(ihsym.ge.184) go to 10
|
if(ihsym.ge.184) go to 10
|
||||||
endif
|
endif
|
||||||
@ -84,24 +87,53 @@ program jt9
|
|||||||
|
|
||||||
10 close(10)
|
10 close(10)
|
||||||
iz=1000.0/df3
|
iz=1000.0/df3
|
||||||
! print*,'A',ihsym,nhsym,tstep,df3,ntol,nfqso
|
|
||||||
|
|
||||||
! Now do the decoding
|
! Now do the decoding
|
||||||
nutc=nutc0
|
nutc=nutc0
|
||||||
|
|
||||||
! Get sync, approx freq
|
! Get sync, approx freq
|
||||||
call sync9(ss,tstep,df3,ntol,nfqso,sync,snr,fpk0,red)
|
call sync9(ss,tstep,df3,ntol,nfqso,ccfred,ia,ib,ipk)
|
||||||
! print*,'B',sync,fpk,npts8,nsps
|
|
||||||
call spec9(c0,npts8,nsps,fpk0,fpk,xdt,i1SoftSymbols)
|
fgood=0.
|
||||||
call decode9(i1SoftSymbols,msg)
|
df8=1500.0/(nsps/8)
|
||||||
nsync=sync
|
sbest=0.
|
||||||
nsnr=nint(snr)
|
do i=ia,ib
|
||||||
width=0.0
|
f=(i-1)*df3
|
||||||
write(*,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
|
if((i.eq.ipk .or. ccfred(i).ge.3.0) .and. f.gt.fgood+10.0*df8) then
|
||||||
1010 format(i4.4,i4,i5,f6.1,f8.2,f6.2,3x,a22)
|
call spec9(c0,npts8,nsps,f,fpk,xdt,i1SoftSymbols)
|
||||||
|
call decode9(i1SoftSymbols,limit,nlim,msg)
|
||||||
|
print*,msg
|
||||||
|
snr=10.0*log10(ccfred(i)) - 10.0*log10(2500.0/df3) + 2.0
|
||||||
|
sync=ccfred(i) - 2.0
|
||||||
|
if(sync.lt.0.0) sync=0.0
|
||||||
|
nsync=sync
|
||||||
|
if(nsync.gt.10) nsync=10
|
||||||
|
nsnr=nint(snr)
|
||||||
|
width=0.0
|
||||||
|
|
||||||
|
if(ccfred(i).gt.sbest .and. fgood.eq.0.0) then
|
||||||
|
sbest=ccfred(i)
|
||||||
|
write(line,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width
|
||||||
|
if(nsync.gt.0) nsynced=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if(msg.ne.' ') then
|
||||||
|
write(13,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
|
||||||
|
1010 format(i4.4,i4,i5,f6.1,f8.2,f6.2,3x,a22)
|
||||||
|
write(14,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
|
||||||
|
fgood=f
|
||||||
|
nsynced=1
|
||||||
|
ndecoded=1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
|
||||||
|
if(fgood.eq.0.0) then
|
||||||
|
write(13,1020) line
|
||||||
|
write(14,1020) line
|
||||||
|
1020 format(a33)
|
||||||
|
endif
|
||||||
|
|
||||||
! write(*,1010) nutc,sync,xdt,1000.0+fpk,msg
|
|
||||||
!1010 format(i4.4,3f7.1,2x,a22)
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
go to 999
|
go to 999
|
||||||
|
@ -7,7 +7,9 @@ subroutine spec9(c0,npts8,nsps,fpk0,fpk,xdt,i1SoftSymbols)
|
|||||||
complex c(0:MAXFFT-1)
|
complex c(0:MAXFFT-1)
|
||||||
integer*1 i1SoftSymbolsScrambled(207)
|
integer*1 i1SoftSymbolsScrambled(207)
|
||||||
integer*1 i1SoftSymbols(207)
|
integer*1 i1SoftSymbols(207)
|
||||||
|
integer*1 i1
|
||||||
integer ig(0:7)
|
integer ig(0:7)
|
||||||
|
equivalence (i1,i4)
|
||||||
data ig/0,1,3,2,7,6,4,5/ !Gray code removal
|
data ig/0,1,3,2,7,6,4,5/ !Gray code removal
|
||||||
include 'jt9sync.f90'
|
include 'jt9sync.f90'
|
||||||
save
|
save
|
||||||
@ -39,9 +41,6 @@ subroutine spec9(c0,npts8,nsps,fpk0,fpk,xdt,i1SoftSymbols)
|
|||||||
call peakdt9(c1,npts8,nsps8,istart,foffset,idt)
|
call peakdt9(c1,npts8,nsps8,istart,foffset,idt)
|
||||||
istart=istart + 0.0625*nsps8*idt
|
istart=istart + 0.0625*nsps8*idt
|
||||||
xdt=istart/1500.0 - 1.0
|
xdt=istart/1500.0 - 1.0
|
||||||
! write(*,3002) 0.0625*nsps8*idt/1500.0,idf*0.1*1500.0/nsps8
|
|
||||||
!3002 format(2f8.2)
|
|
||||||
|
|
||||||
|
|
||||||
fshift=foffset
|
fshift=foffset
|
||||||
twopi=8.0*atan(1.0)
|
twopi=8.0*atan(1.0)
|
||||||
@ -71,6 +70,18 @@ subroutine spec9(c0,npts8,nsps,fpk0,fpk,xdt,i1SoftSymbols)
|
|||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
sum=0.
|
||||||
|
do j=1,69
|
||||||
|
smax=0.
|
||||||
|
do i=0,7
|
||||||
|
smax=max(smax,ssym(i,j))
|
||||||
|
sum=sum+ssym(i,j)
|
||||||
|
enddo
|
||||||
|
sum=sum-smax
|
||||||
|
enddo
|
||||||
|
ave=sum/(69*7)
|
||||||
|
ssym=ssym/ave
|
||||||
|
|
||||||
m0=3
|
m0=3
|
||||||
ntones=8
|
ntones=8
|
||||||
k=0
|
k=0
|
||||||
@ -87,11 +98,17 @@ subroutine spec9(c0,npts8,nsps,fpk0,fpk,xdt,i1SoftSymbols)
|
|||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
k=k+1
|
k=k+1
|
||||||
i1SoftSymbolsScrambled(k)=min(127,max(-127,nint(10.0*(r1-r2)))) + 128
|
i4=nint(10.0*(r1-r2))
|
||||||
|
if(i4.lt.-127) i4=-127
|
||||||
|
if(i4.gt.127) i4=127
|
||||||
|
i4=i4+128
|
||||||
|
i1SoftSymbolsScrambled(k)=i1
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
call interleave9(i1SoftSymbolsScrambled,-1,i1SoftSymbols)
|
call interleave9(i1SoftSymbolsScrambled,-1,i1SoftSymbols)
|
||||||
|
call flush(81)
|
||||||
|
call flush(82)
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine spec9
|
end subroutine spec9
|
||||||
|
@ -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…
Reference in New Issue
Block a user