mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 20:28:42 -05:00
Many changes to make operator interactions useful.
Quick-decode searches over ipol, DT, and nflip. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@406 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
dfd8b44002
commit
876668f7cb
3
ccf2.f
3
ccf2.f
@ -1,6 +1,7 @@
|
||||
subroutine ccf2(ss,nz,nflip,ccfbest,lagpk)
|
||||
|
||||
parameter (LAGMAX=20)
|
||||
! parameter (LAGMAX=20)
|
||||
parameter (LAGMAX=100)
|
||||
real ss(nz)
|
||||
real ccf(-LAGMAX:LAGMAX)
|
||||
integer npr(126)
|
||||
|
19
decode1a.f
19
decode1a.f
@ -79,8 +79,25 @@ C Find best DF, f1, f2, DT, and pol
|
||||
i0=nint((a(5)+0.5)*fsample) - 2
|
||||
if(i0.lt.1) i0=1
|
||||
nz=n6+1-i0
|
||||
|
||||
ip0=ipol
|
||||
nflip=1
|
||||
call afc65b(c5x(i0),c5y(i0),nz,fsample,nflip,ipol,a,dt,
|
||||
+ ccfbest,dtbest)
|
||||
+ ccfbest,dtbest)
|
||||
|
||||
nflip=-1
|
||||
ipol=ip0
|
||||
call afc65b(c5x(i0),c5y(i0),nz,fsample,nflip,ipol,a,dt,
|
||||
+ ccfbest2,dtbest)
|
||||
|
||||
if(ccfbest2.lt.ccfbest) then
|
||||
nflip=1
|
||||
ipol=ip0
|
||||
call afc65b(c5x(i0),c5y(i0),nz,fsample,nflip,ipol,a,dt,
|
||||
+ ccfbest,dtbest)
|
||||
else
|
||||
ccfbest=ccfbest
|
||||
endif
|
||||
|
||||
pol=a(4)/57.2957795
|
||||
aa=cos(pol)
|
||||
|
@ -35,6 +35,7 @@ C Compute spectra of the channel symbols
|
||||
qual=0.
|
||||
if(ndepth.ge.1) call deep65(s3,mode65,neme,
|
||||
+ nsked,flip,mycall,hiscall,hisgrid,deepmsg,qual)
|
||||
print*,ndepth,qual,deepmsg
|
||||
|
||||
if(ncount.lt.0) decoded=' '
|
||||
|
||||
|
@ -42,6 +42,7 @@ integer nfmid !Center frequency of main display GUI
|
||||
integer nfrange !Frequency range of main display GUI
|
||||
integer nport !Requested COM port number GUI
|
||||
integer mousedf !Mouse-selected freq offset, DF GUI
|
||||
integer mousefqso !Mouse-selected QSO freq GUI
|
||||
integer neme !EME calls only in deep search? GUI
|
||||
integer nsked !Sked mode for deep search? GUI
|
||||
integer naggressive !Is "Aggressive decoding" checked? GUI
|
||||
@ -92,7 +93,7 @@ common/gcom2/ps0(431),psavg(450),s2(64,3100),ccf(-5:540), &
|
||||
ndecdone,npingtime,ierr,lauto,mantx,nrestart,ntr,nmsg,nsave,nadd5, &
|
||||
dftolerance,LDecoded,rxdone,monitoring,nzap,nsavecum,minsigdb, &
|
||||
nclearave,nfreeze,nafc,newspec,nmode,mode65,nclip,ndebug,nblank,nport, &
|
||||
mousedf,neme,nsked,naggressive,ntx2,nagain,nsavelast, &
|
||||
mousedf,mousefqso,neme,nsked,naggressive,ntx2,nagain,nsavelast, &
|
||||
shok,sendingsh,d2a(661500),d2b(661500),b(60000),jza,jzb,ntime, &
|
||||
idinterval,msmax,lenappdir,idf,ndiskdat,nlines,nflat,ntxreq,ntxnow, &
|
||||
ndepth,nspecial,ndf,nfmid,nfrange,ss1(-224:224),ss2(-224:224), &
|
||||
|
26
map65.py
26
map65.py
@ -367,7 +367,7 @@ def txstop(event=NONE):
|
||||
if lauto: toggleauto()
|
||||
Audio.gcom1.txok=0
|
||||
Audio.gcom2.mantx=0
|
||||
specjt.pal_gray0()
|
||||
# specjt.pal_gray0() ????
|
||||
|
||||
#------------------------------------------------------ lookup
|
||||
def lookup(event=NONE):
|
||||
@ -868,13 +868,15 @@ def mouse_up_g1(event):
|
||||
|
||||
#------------------------------------------------------ right_arrow
|
||||
def right_arrow(event=NONE):
|
||||
n=5*int(Audio.gcom2.mousedf/5) + 5
|
||||
n=5*int(Audio.gcom2.mousedf/5)
|
||||
if n>0: n=n+5
|
||||
if n==Audio.gcom2.mousedf: n=n+5
|
||||
Audio.gcom2.mousedf=n
|
||||
|
||||
|
||||
#------------------------------------------------------ left_arrow
|
||||
def left_arrow(event=NONE):
|
||||
n=5*int(Audio.gcom2.mousedf/5)
|
||||
if n<0: n=n-5
|
||||
if n==Audio.gcom2.mousedf: n=n-5
|
||||
Audio.gcom2.mousedf=n
|
||||
|
||||
@ -1156,11 +1158,10 @@ def update():
|
||||
|
||||
msg1.configure(text="%6.4f" % (samfac_out))
|
||||
msg2.configure(text=mode.get())
|
||||
t="Freeze DF:%4d" % (int(Audio.gcom2.mousedf),)
|
||||
if abs(int(Audio.gcom2.mousedf))>600:
|
||||
msg3.configure(text=t,fg='black',bg='red')
|
||||
else:
|
||||
msg3.configure(text=t,fg='black',bg='gray85')
|
||||
t="QSO Freq:%4d" % (int(Audio.gcom2.mousefqso),)
|
||||
msg3.configure(text=t)
|
||||
t="QSO DF:%4d" % (int(Audio.gcom2.mousedf),)
|
||||
msg4.configure(text=t)
|
||||
bdecode.configure(bg='gray85',activebackground='gray95')
|
||||
if Audio.gcom2.ndecoding: #Set button bg=light_blue while decoding
|
||||
bc='#66FFFF'
|
||||
@ -1524,6 +1525,8 @@ root.bind_all('<Shift-F8>', ModeJT65B)
|
||||
root.bind_all('<Control-F8>', ModeJT65C)
|
||||
root.bind_all('<F10>', showspecjt)
|
||||
root.bind_all('<Shift-F10>', astro1)
|
||||
root.bind_all('<F11>',left_arrow)
|
||||
root.bind_all('<F12>',right_arrow)
|
||||
root.bind_all('<Alt-Key-1>',btx1)
|
||||
root.bind_all('<Alt-Key-2>',btx2)
|
||||
root.bind_all('<Alt-Key-3>',btx3)
|
||||
@ -1565,8 +1568,6 @@ root.bind_all('<Alt-z>',toggle_zap)
|
||||
root.bind_all('<Alt-Z>',toggle_zap)
|
||||
root.bind_all('<Control-l>',lookup_gen)
|
||||
root.bind_all('<Control-L>',lookup_gen)
|
||||
root.bind_all('<Left>',left_arrow)
|
||||
root.bind_all('<Right>',right_arrow)
|
||||
|
||||
text.pack(side=LEFT, fill=X, padx=1)
|
||||
sb = Scrollbar(iframe4, orient=VERTICAL, command=text.yview)
|
||||
@ -1747,8 +1748,8 @@ msg2=Message(iframe6, text="Message #2", width=300,relief=SUNKEN)
|
||||
msg2.pack(side=LEFT, fill=X, padx=1)
|
||||
msg3=Message(iframe6,width=300,relief=SUNKEN)
|
||||
msg3.pack(side=LEFT, fill=X, padx=1)
|
||||
#msg4=Message(iframe6, text="", width=300,relief=SUNKEN)
|
||||
#msg4.pack(side=LEFT, fill=X, padx=1)
|
||||
msg4=Message(iframe6, text="", width=300,relief=SUNKEN)
|
||||
msg4.pack(side=LEFT, fill=X, padx=1)
|
||||
#msg5=Message(iframe6, text="", width=300,relief=SUNKEN)
|
||||
#msg5.pack(side=LEFT, fill=X, padx=1)
|
||||
msg7=Message(iframe6, text=' ', width=300,relief=SUNKEN)
|
||||
@ -1873,6 +1874,7 @@ Audio.gcom2.ndepth=ndepth.get()
|
||||
Audio.ftn_init()
|
||||
GenStdMsgs()
|
||||
Audio.gcom4.addpfx=(options.addpfx.get().lstrip()+' ')[:8]
|
||||
Audio.gcom2.mousefqso=125
|
||||
# stopmon()
|
||||
monitor()
|
||||
first=1
|
||||
|
49
map65a.f90
49
map65a.f90
@ -20,7 +20,7 @@ subroutine map65a
|
||||
common/spcom/ip0,ss(4,322,NFFT),ss5(322,NFFT)
|
||||
data blank/' '/
|
||||
data shmsg0/'ATT','RO ','RRR','73 '/
|
||||
data nfile/0/,nutc0/-999/,nid/0/
|
||||
data nfile/0/,nutc0/-999/,nid/0/,ip00/1/
|
||||
include 'gcom2.f90'
|
||||
save
|
||||
|
||||
@ -43,7 +43,8 @@ subroutine map65a
|
||||
! nflip=-1
|
||||
! ip0=1
|
||||
|
||||
fselect=128.0 + 1.6 + 0.220 ! AA1YN (OK)
|
||||
! fselect=128.0 + 1.6 + 0.220 ! AA1YN (OK)
|
||||
fselect=mousefqso + 0.001*mousedf + 1.6
|
||||
nflip=1
|
||||
ip0=3
|
||||
|
||||
@ -71,25 +72,42 @@ subroutine map65a
|
||||
|
||||
! nfilt=2 should be faster (but doesn't work right?)
|
||||
nfilt=2 !nfilt=2 is faster for selected freq
|
||||
freq=fselect
|
||||
dt=2.314240 !Not needed?
|
||||
call decode1a(id(1,1,kbuf),newdat2,nfilt,freq,nflip,ip0,sync2, &
|
||||
a,dt,pol,nkv,nhist,qual,decoded)
|
||||
nsync1=0
|
||||
nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ###
|
||||
ndf=nint(a(1))
|
||||
nw=0
|
||||
do kpol=0,3
|
||||
freq=fselect
|
||||
ip0=ip00+kpol
|
||||
if(ip0.gt.4) ip0=ip0-4
|
||||
dt00=2.314240
|
||||
dt=dt00
|
||||
call decode1a(id(1,1,kbuf),newdat2,nfilt,freq,nflip,ip0,sync2, &
|
||||
a,dt,pol,nkv,nhist,qual,decoded)
|
||||
nsync1=0
|
||||
nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ###
|
||||
ndf=nint(a(1)) + mousedf
|
||||
nw=0
|
||||
! write(*,3000) freq,nflip,ip00,ndf,nsync2,nint(pol*57.2957795), &
|
||||
! dt00,dt,decoded
|
||||
!3000 format(f8.3,5i5,2f7.2,2x,a22)
|
||||
if(nkv.gt.0) go to 5
|
||||
enddo
|
||||
|
||||
! Insert 'OOO' if flip<0.
|
||||
! write(11,1010) nutc,nsync2,dt,ndf,nw,decoded,nkv,nqual
|
||||
!1010 format(i4.4,i4,f5.1,i5,i3,2x,a22,2i3)
|
||||
5 ip00=ip0
|
||||
nkHz=nint(freq-1.600)
|
||||
npol=45*(ipol-1)
|
||||
write(11,1010) nkHz,ndf,npol,nutc,nsync2,dt,nw,decoded,nkv,nqual
|
||||
npol=nint(57.2957795*pol)
|
||||
nqual=qual
|
||||
if(nflip.eq.-1) then !Should this be in decode1a ?
|
||||
do i=22,9,-1
|
||||
if(decoded(i:i).ne.' ') then
|
||||
decoded(i+2:i+4)='OOO'
|
||||
go to 6
|
||||
endif
|
||||
enddo
|
||||
endif
|
||||
6 write(11,1010) nkHz,ndf,npol,nutc,nsync2,dt,nw,decoded,nkv,nqual
|
||||
1010 format(i3,i5,i4,i5.4,i4,f5.1,i3,2x,a22,2i3)
|
||||
call flushqqq(11)
|
||||
ndecdone=1
|
||||
endif
|
||||
if(nagain.eq.1) go to 999
|
||||
if(newdat2.eq.0) go to 999
|
||||
|
||||
nfilt=1
|
||||
@ -295,5 +313,6 @@ subroutine map65a
|
||||
ndecdone=2
|
||||
|
||||
999 newdat2=0
|
||||
nagain=0
|
||||
return
|
||||
end subroutine map65a
|
||||
|
32
recvpkt.F90
32
recvpkt.F90
@ -17,9 +17,10 @@ subroutine recvpkt(iarg)
|
||||
common/plrscom/center_freq,msec,fqso,iptr,nblock,userx_no,iusb,buf8(174)
|
||||
! 8 4 4 4 2 1 1 1392
|
||||
include 'datcom.f90'
|
||||
include 'gcom1.f90'
|
||||
include 'gcom2.f90'
|
||||
equivalence (id,d8)
|
||||
data nblock0/0/,first/.true./,kb/1/
|
||||
data nblock0/0/,first/.true./,kb/1/,ntx/0/
|
||||
save
|
||||
|
||||
! Open a socket to receive multicast data from Linrad
|
||||
@ -54,10 +55,17 @@ subroutine recvpkt(iarg)
|
||||
nlost=0
|
||||
endif
|
||||
|
||||
do i=1,174
|
||||
k=k+1
|
||||
d8(k)=buf8(i)
|
||||
enddo
|
||||
if(transmitting.eq.0) then
|
||||
do i=1,174
|
||||
k=k+1
|
||||
d8(k)=buf8(i)
|
||||
enddo
|
||||
else
|
||||
do i=1,174
|
||||
k=k+1
|
||||
d8(k)=0.d0
|
||||
enddo
|
||||
endif
|
||||
|
||||
npkt=npkt+1
|
||||
if(nsec.ne.nsec0) then
|
||||
@ -68,14 +76,16 @@ subroutine recvpkt(iarg)
|
||||
! write(*,1010) mutc,ns,0.001*msec,k
|
||||
!1010 format('UTC:',i5.4,' ns:',i3,' t:',f10.3,' k:',i8)
|
||||
nsec0=nsec
|
||||
ntx=ntx+transmitting
|
||||
if(mod(nsec,60).eq.52) then
|
||||
kbuf=kb
|
||||
nutc=mutc
|
||||
klost=nlost
|
||||
if(ntx.lt.20) ndecoding=1
|
||||
ntx=0
|
||||
endif
|
||||
endif
|
||||
|
||||
if(mod(nsec,60).eq.52) then
|
||||
kbuf=kb
|
||||
nutc=mutc
|
||||
klost=nlost
|
||||
ndecoding=1
|
||||
endif
|
||||
endif
|
||||
go to 10
|
||||
|
||||
|
81
specjt.py
81
specjt.py
@ -104,22 +104,29 @@ def pal_AFMHot():
|
||||
im2.putpalette(Colormap2Palette(colormapAFMHot),"RGB")
|
||||
|
||||
#--------------------------------------------------- Command button routines
|
||||
|
||||
#---------------------------------------------------- fdf_change
|
||||
# Readout of graphical cursor location
|
||||
def fdf_change(event):
|
||||
g.DFreq=df*(event.x-288.7) + fmid - 1500
|
||||
if nfr.get()==2: g.DFreq=2*df*(event.x-375.5) + fmid - 1270.5
|
||||
g.Freq=g.DFreq+1270.46
|
||||
# t="Freq: %5d DF: %5d (Hz)" % (int(g.Freq),int(g.DFreq))
|
||||
t="Freq: %5d" % (event.x)
|
||||
df=96.0/750.0
|
||||
fmid=122.8 # empirical
|
||||
g.Freq=df*(event.x-375) + fmid
|
||||
t="Freq: %5.1f kHz" % (g.Freq,)
|
||||
fdf.configure(text=t)
|
||||
|
||||
def fdf_change2(event):
|
||||
g.DFreq=(2200.0/750.0)*(event.x-375)
|
||||
t="Freq: %5.1f kHz" % (g.DFreq,)
|
||||
fdf2.configure(text=t)
|
||||
|
||||
#---------------------------------------------------- set_fqso
|
||||
def set_fqso(event):
|
||||
n=int(g.Freq + 0.5)
|
||||
Audio.gcom2.mousefqso=n
|
||||
|
||||
#---------------------------------------------------- set_freezedf
|
||||
def set_freezedf(event):
|
||||
n=int(df*(event.x-288.7) + fmid - 1500)
|
||||
if nfr.get()==2: n=int(2*df*(event.x-375.5) + fmid - 1270.5)
|
||||
if n<-1270: n=-1270
|
||||
if n>3800: n=3800
|
||||
n=int(g.DFreq + 0.5)
|
||||
Audio.gcom2.mousedf=n
|
||||
|
||||
#------------------------------------------------------ ftnstr
|
||||
@ -152,20 +159,20 @@ def df_mark():
|
||||
color='red'
|
||||
|
||||
#---------------------------------------------------- change_fmid
|
||||
def change_fmid1():
|
||||
global fmid
|
||||
fmid=fmid+100
|
||||
if fmid>5000-1000*nfr.get(): fmid=5000-1000*nfr.get()
|
||||
|
||||
def change_fmid2():
|
||||
global fmid
|
||||
fmid=fmid-100
|
||||
if fmid<1000*nfr.get(): fmid=1000*nfr.get()
|
||||
|
||||
def set_fmid():
|
||||
global fmid
|
||||
if nfr.get()==1: fmid=1200
|
||||
if nfr.get()==2: fmid=2200
|
||||
##def change_fmid1():
|
||||
## global fmid
|
||||
## fmid=fmid+100
|
||||
## if fmid>5000-1000*nfr.get(): fmid=5000-1000*nfr.get()
|
||||
##
|
||||
##def change_fmid2():
|
||||
## global fmid
|
||||
## fmid=fmid-100
|
||||
## if fmid<1000*nfr.get(): fmid=1000*nfr.get()
|
||||
##
|
||||
##def set_fmid():
|
||||
## global fmid
|
||||
## if nfr.get()==1: fmid=1200
|
||||
## if nfr.get()==2: fmid=2200
|
||||
|
||||
#---------------------------------------------------- freq_range
|
||||
def freq_range(event):
|
||||
@ -179,8 +186,8 @@ def freq_range(event):
|
||||
if fmid<1000*nfr.get(): fmid=1000*nfr.get()
|
||||
if fmid>5000-1000*nfr.get(): fmid=5000-1000*nfr.get()
|
||||
|
||||
def set_frange():
|
||||
nfr.set(3-nfr.get())
|
||||
#def set_frange():
|
||||
# nfr.set(3-nfr.get())
|
||||
|
||||
#---------------------------------------------------- freq_center
|
||||
##def freq_center(event):
|
||||
@ -415,22 +422,24 @@ setupmenu.add_cascade(label = 'Palette',menu=setupmenu.palettes)
|
||||
|
||||
lab1=Label(mbar,padx=20,bd=0)
|
||||
lab1.pack(side=LEFT)
|
||||
fdf=Label(mbar,width=25,bd=0)
|
||||
fdf=Label(mbar,width=15,bd=0)
|
||||
fdf.pack(side=LEFT)
|
||||
fdf2=Label(mbar,width=15,bd=0)
|
||||
fdf2.pack(side=LEFT)
|
||||
|
||||
lab3=Label(mbar,padx=13,bd=0)
|
||||
lab3.pack(side=LEFT)
|
||||
bbw=Button(mbar,text='BW',command=set_frange,padx=1,pady=1)
|
||||
bbw.pack(side=LEFT)
|
||||
#bbw=Button(mbar,text='BW',command=set_frange,padx=1,pady=1)
|
||||
#bbw.pack(side=LEFT)
|
||||
|
||||
lab0=Label(mbar,padx=10,bd=0)
|
||||
lab0.pack(side=LEFT)
|
||||
bfmid1=Button(mbar,text='<',command=change_fmid1,padx=1,pady=1)
|
||||
bfmid2=Button(mbar,text='>',command=change_fmid2,padx=1,pady=1)
|
||||
bfmid3=Button(mbar,text='|',command=set_fmid,padx=3,pady=1)
|
||||
bfmid1.pack(side=LEFT)
|
||||
bfmid3.pack(side=LEFT)
|
||||
bfmid2.pack(side=LEFT)
|
||||
#bfmid1=Button(mbar,text='<',command=change_fmid1,padx=1,pady=1)
|
||||
#bfmid2=Button(mbar,text='>',command=change_fmid2,padx=1,pady=1)
|
||||
#bfmid3=Button(mbar,text='|',command=set_fmid,padx=3,pady=1)
|
||||
#bfmid1.pack(side=LEFT)
|
||||
#bfmid3.pack(side=LEFT)
|
||||
#bfmid2.pack(side=LEFT)
|
||||
|
||||
#------------------------------------------------- Speed selection buttons
|
||||
for i in (5, 4, 3, 2, 1):
|
||||
@ -453,7 +462,7 @@ graph1.pack(side=TOP)
|
||||
Widget.bind(graph1,"<Motion>",fdf_change)
|
||||
#Widget.bind(graph1,"<Button-1>",decode_request)
|
||||
#Widget.bind(graph1,"<Button-3>",decode_request)
|
||||
Widget.bind(graph1,"<Button-1>",set_freezedf)
|
||||
Widget.bind(graph1,"<Button-1>",set_fqso)
|
||||
Widget.bind(graph1,"<Double-Button-1>",freeze_decode)
|
||||
iframe1.pack(expand=1, fill=X)
|
||||
|
||||
@ -466,7 +475,7 @@ Widget.bind(c2,"<Shift-Button-3>",freq_range)
|
||||
|
||||
graph2=Canvas(iframe1, bg='black', width=NX, height=NY,bd=0,cursor='crosshair')
|
||||
graph2.pack(side=TOP)
|
||||
Widget.bind(graph2,"<Motion>",fdf_change)
|
||||
Widget.bind(graph2,"<Motion>",fdf_change2)
|
||||
#Widget.bind(graph2,"<Button-1>",decode_request)
|
||||
#Widget.bind(graph2,"<Button-3>",decode_request)
|
||||
Widget.bind(graph2,"<Button-1>",set_freezedf)
|
||||
|
Loading…
Reference in New Issue
Block a user