mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-17 17:42:02 -05:00
Waterfall AGC based on 40th percentile of avg spectrum.
Double-click in zoomed spectrum sets Tol=100. Lower threshold for quick decode (nqd=1), if TOL.le.100. Fixed display of shorthand S/N in main text window. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@560 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
990b2f03eb
commit
4c794f9789
11
map65.py
11
map65.py
@ -1007,9 +1007,14 @@ def update():
|
||||
astrotext.insert(END,"Dgrd:%6.1f\n" % g.Dgrd)
|
||||
|
||||
if g.freeze_decode and mode.get()[:4]=='JT65':
|
||||
itol=5
|
||||
ltol.configure(text='Tol '+str(500))
|
||||
Audio.gcom2.dftolerance=500
|
||||
if g.freeze_decode==1:
|
||||
itol=5
|
||||
ltol.configure(text='Tol '+str(500))
|
||||
Audio.gcom2.dftolerance=500
|
||||
else:
|
||||
itol=3
|
||||
ltol.configure(text='Tol '+str(100))
|
||||
Audio.gcom2.dftolerance=100
|
||||
nfreeze.set(1)
|
||||
Audio.gcom2.nfreeze=1
|
||||
if Audio.gcom2.monitoring:
|
||||
|
13
map65a.F90
13
map65a.F90
@ -44,7 +44,7 @@ subroutine map65a(newdat)
|
||||
if(nutc.ne.nutc0) nfile=nfile+1
|
||||
nutc0=nutc
|
||||
nutcdata=nutc
|
||||
df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz
|
||||
df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz
|
||||
ftol=0.020 !Frequency tolerance (kHz)
|
||||
foffset=0.001*(1270 + nfcal)
|
||||
fselect=mousefqso + foffset
|
||||
@ -60,12 +60,12 @@ subroutine map65a(newdat)
|
||||
iloop=0
|
||||
2 if(ndphi.eq.1) dphi=30*iloop/57.2957795
|
||||
do nqd=1,0,-1
|
||||
if(nqd.eq.1) then
|
||||
if(nqd.eq.1) then !Quick decode, at fQSO
|
||||
fa=1000.0*(fselect+0.001*mousedf-100.0) - dftolerance
|
||||
fb=1000.0*(fselect+0.001*mousedf-100.0) + dftolerance
|
||||
ia=nint((fa+23000.0)/df + 1.0) ! 23000 = 48000 - 25000
|
||||
ib=nint((fb+23000.0)/df + 1.0)
|
||||
else
|
||||
else !Wideband decode at all freqs
|
||||
fa=1000*(nfa-100)
|
||||
fb=1000*(nfb-100)
|
||||
ia=nint((fa+23000.0)/df + 1.0) ! 23000 = 48000 - 25000
|
||||
@ -168,7 +168,9 @@ subroutine map65a(newdat)
|
||||
|
||||
! ########################### Search for Normal Messages ###########
|
||||
! Is sync1 above threshold?
|
||||
if(sync1.gt.1.0) then
|
||||
thresh1=1.0
|
||||
if(nqd.eq.1 .and. dftolerance.le.100) thresh1=0. !Lower threshold at fQSO
|
||||
if(sync1.gt.thresh1) then
|
||||
|
||||
! Keep only the best candidate within ftol.
|
||||
! (Am I deleting any good decodes by doing this?)
|
||||
@ -186,7 +188,6 @@ subroutine map65a(newdat)
|
||||
if(i1.ge.5 .or. i2.ge.9) then
|
||||
nhispol=nint(57.2957795*pol)
|
||||
endif
|
||||
|
||||
km=km+1
|
||||
sig(km,1)=nfile
|
||||
sig(km,2)=nutc
|
||||
@ -244,6 +245,8 @@ subroutine map65a(newdat)
|
||||
! ndf2=nint(a(3))
|
||||
nsync1=sync1
|
||||
nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ###
|
||||
if(decoded(1:4).eq.'RO ' .or. decoded(1:4).eq.'RRR ' .or. &
|
||||
decoded(1:4).eq.'73 ') nsync2=nsync2-6
|
||||
nw=0 !### Fix this! ###
|
||||
nwrite=nwrite+1
|
||||
if(ndphi.eq.0) then
|
||||
|
13
spec.f90
13
spec.f90
@ -17,7 +17,7 @@ subroutine spec(brightness,contrast,ngain,nspeed,a,a2)
|
||||
|
||||
! Could save memory by doing the averaging-by-7 (or 10?) of ss5 in symspec.
|
||||
include 'spcom.f90'
|
||||
real s(NFFT,NY)
|
||||
real s(NFFT,NY),savg2(NFFT),tmp(NFFT)
|
||||
include 'gcom1.f90'
|
||||
include 'gcom2.f90'
|
||||
include 'gcom3.f90'
|
||||
@ -45,6 +45,15 @@ subroutine spec(brightness,contrast,ngain,nspeed,a,a2)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
call zero(savg2,NFFT)
|
||||
do j=1,nlines
|
||||
call add(savg2,s(1,j),savg2,NFFT)
|
||||
enddo
|
||||
|
||||
ia=0.03*NFFT
|
||||
nn=0.94*NFFT
|
||||
call pctile(savg2(ia),tmp,nn,40,base)
|
||||
base=base/(nadd*nlines)
|
||||
|
||||
newpts=NX*nlines
|
||||
do i=newpts+1,NX*NY
|
||||
@ -56,6 +65,7 @@ subroutine spec(brightness,contrast,ngain,nspeed,a,a2)
|
||||
gamma=1.3 + 0.01*contrast
|
||||
offset=(brightness+64.0)/2
|
||||
fac=20.0/nadd
|
||||
fac=fac*(0.1537/base)
|
||||
foffset=0.001*(1270+nfcal)
|
||||
nbpp=(nfb-nfa)*NFFT/(96.0*NX) !Bins per pixel in wideband (upper) waterfall
|
||||
fselect=mousefqso + foffset
|
||||
@ -73,7 +83,6 @@ subroutine spec(brightness,contrast,ngain,nspeed,a,a2)
|
||||
do j=nlines,1,-1 !Reverse order so last will be on top
|
||||
do i=1,NX
|
||||
k=k+1
|
||||
|
||||
n=0
|
||||
x=0.
|
||||
iia=(i-1)*nbpp + ii0 + 1
|
||||
|
@ -245,7 +245,7 @@ def freeze_decode2(event):
|
||||
# If decoder is busy or we are not monitoring, ignore request
|
||||
if Audio.gcom2.ndecoding==0 or Audio.gcom2.monitoring==0:
|
||||
set_freezedf(event)
|
||||
g.freeze_decode=1
|
||||
g.freeze_decode=2
|
||||
|
||||
#---------------------------------------------------- update
|
||||
def update():
|
||||
|
10
symspec.f90
10
symspec.f90
@ -24,8 +24,8 @@ subroutine symspec(id,kbuf,kk,kkdone,nutc,newdat)
|
||||
if(nagc.ne.0) fac=0.0002 * 10.0**(0.05*(-rxnoise))
|
||||
hsym=2048.d0*96000.d0/11025.d0 !Samples per half symbol
|
||||
npts=hsym !Integral samples per half symbol
|
||||
ntot=322 !Half symbols per transmission
|
||||
! ntot=279 !Half symbols in 51.8 sec
|
||||
ntot=322 !Half symbols per transmission
|
||||
! ntot=279 !Half symbols in 51.8 sec
|
||||
|
||||
if(kbuf.ne.kbuf0 .or. ndiskdat.eq.1) then
|
||||
kkdone=0
|
||||
@ -41,10 +41,10 @@ subroutine symspec(id,kbuf,kk,kkdone,nutc,newdat)
|
||||
|
||||
do nn=1,ntot
|
||||
i0=ts+hsym !Starting sample pointer
|
||||
if((i0+npts-1).gt.kkk) go to 998 !See if we have enough points
|
||||
if((i0+npts-1).gt.kkk) go to 998 !See if we have enough points
|
||||
i1=ts+2*hsym !Next starting sample pointer
|
||||
ts=ts+hsym !OK, update the exact sample pointer
|
||||
do i=1,npts !Copy data to FFT arrays
|
||||
ts=ts+hsym !OK, update the exact sample pointer
|
||||
do i=1,npts !Copy data to FFT arrays
|
||||
xr=fac*id(1,i0+i,kbuf)
|
||||
xi=fac*id(2,i0+i,kbuf)
|
||||
cx(i)=cmplx(xr,xi)
|
||||
|
Loading…
Reference in New Issue
Block a user