From f816f479fd457431ec72fedbe3f69cde8d96d5eb Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 11 Jul 2007 19:47:36 +0000 Subject: [PATCH] Tx pol is now computed and displayed in status bar. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@497 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- gcom2.f90 | 6 ++++-- map65.py | 27 +++++++++++++++++++++++---- map65a.F90 | 25 +++++++++++++++++++------ recvpkt.F90 | 3 +++ 4 files changed, 49 insertions(+), 12 deletions(-) diff --git a/gcom2.f90 b/gcom2.f90 index ef5f613d1..757546ff5 100644 --- a/gcom2.f90 +++ b/gcom2.f90 @@ -7,6 +7,7 @@ real ccf !CCF in time (blue curve) Decoder real green !Data for green line GUI real fselect !Specified QSO frequency GUI real pctlost !Percent of lost packets Decoder +real fcenter !Linrad center freq, from pkt header recvpkt real rxnoise !Rx noise in dB recvpkt real dphi !Phase shift between pol'n channels GUI,Decoder integer ngreen !Length of green GUI @@ -47,6 +48,7 @@ integer nbpp !# FFT Bins/pixel, wideband waterfall Spec integer nfullspec !Set to 1 to display full spectrum GUI integer ndebug !Write debugging info? GUI integer ndphi !Set to 1 to compute dphi GUI,Decoder +integer nhispol !Pol angle matching HisCall or HisGrid Decoder integer nblank !Is NB checked? GUI integer nfmid !Center frequency of main display GUI integer nfrange !Frequency range of main display GUI @@ -99,12 +101,12 @@ character*12 pttport character*8 utcdata !HHMM UTC for the processed data Decoder common/gcom2/ps0(431),psavg(450),s2(64,3100),ccf(-5:540), & - green(500),fselect,pctlost,rxnoise,dphi,ngreen,dgain,iter, & + green(500),fselect,pctlost,fcenter,rxnoise,dphi,ngreen,dgain,iter, & ndecoding,ndecoding0,mousebutton, & ndecdone,npingtime,ierr,lauto,mantx,nrestart,ntr,nmsg,nsave,nadd5, & dftolerance,LDecoded,rxdone,monitoring,nzap,minsigdb, & nclearave,nfreeze,nafc,ncsmin,newspec,nfa,nfb,nfcal,idphi,nkeep, & - nmode,mode65,nbpp,nfullspec,ndebug,ndphi, & + nmode,mode65,nbpp,nfullspec,ndebug,ndphi,nhispol, & nblank,nport,mousedf,mousefqso,neme,nrw26,naggressive,ntx2,nagain, & shok,sendingsh,d2a(661500),d2b(661500),b(60000),jza,jzb,ntime, & idinterval,msmax,lenappdir,idf,ndiskdat,nlines,nflat,ntxreq,ntxnow, & diff --git a/map65.py b/map65.py index 154b578ed..f81fd7cd1 100644 --- a/map65.py +++ b/map65.py @@ -58,6 +58,7 @@ fileopened="" font1='Helvetica' hiscall="" hisgrid="" +hisgrid0="" isec0=-99 k2txb=IntVar() kb8rq=IntVar() @@ -931,7 +932,7 @@ def GenAltMsgs(event=NONE): def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nopen,kxp0, \ im,pim,cmap0,isync,isync_save,idsec,first,itol,txsnrdb,tx6alt,\ - bm_geom,bm2_geom + bm_geom,bm2_geom,hisgrid0 utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] @@ -978,6 +979,21 @@ def update(): if len(HisGrid.get().strip())<4: g.ndop=g.ndop00 g.dfdt=g.dfdt0 + if hisgrid != hisgrid0: + msg6.configure(text=" ",bg='gray85') + hisgrid0=hisgrid + Audio.gcom2.nhispol=-999 + if Audio.gcom2.nhispol != -999: + txpol=(int(Audio.gcom2.nhispol) - 2*g.poloffset + 360) % 180 + t="Tx pol: %d " % txpol + if txpol < 45 or txpol > 135: + t=t + 'H' + color='pink' + else: + t=t + 'V' + color='yellow' + msg6.configure(text=t,bg=color) + astrotext.delete(1.0,END) astrotext.insert(END,' Moon\n') astrotext.insert(END,"Az: %7.1f\n" % g.AzMoon) @@ -1074,7 +1090,7 @@ def update(): else: bgcolor='green' t='Receiving' - msg6.configure(text=t,bg=bgcolor) + msg7.configure(text=t,bg=bgcolor) if Audio.gcom2.ndecdone>0 or g.cmap != cmap0: if Audio.gcom2.ndecdone==1: @@ -1630,8 +1646,10 @@ 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) -msg6=Message(iframe6, text=' ', width=300,relief=SUNKEN) -msg6.pack(side=RIGHT, fill=X, padx=1) +msg6=Message(iframe6, text="", width=300,relief=SUNKEN) +msg6.pack(side=LEFT, fill=X, padx=1) +msg7=Message(iframe6, text=' ', width=300,relief=SUNKEN) +msg7.pack(side=RIGHT, fill=X, padx=1) iframe6.pack(expand=1, fill=X, padx=4) frame.pack() ldate.after(100,update) @@ -1765,6 +1783,7 @@ GenStdMsgs() Audio.gcom4.addpfx=(options.addpfx.get().lstrip()+' ')[:8] Audio.gcom2.mousefqso=125 Audio.gcom2.nfullspec=0 +Audio.gcom2.nhispol=-999 monitor() first=1 if g.Win32: root.iconbitmap("wsjt.ico") diff --git a/map65a.F90 b/map65a.F90 index e817cdebf..fa3f872c6 100644 --- a/map65a.F90 +++ b/map65a.F90 @@ -43,16 +43,21 @@ subroutine map65a(newdat) if(nutc.ne.nutc0) nfile=nfile+1 nutc0=nutc nutcdata=nutc - df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz ftol=0.020 !Frequency tolerance (kHz) foffset=0.001*(1270 + nfcal) fselect=mousefqso + foffset nfilt=1 dphi=idphi/57.2957795 - + + do i=12,3,-1 + if(hiscall(i:i).ne.' ') go to 1 + enddo + i=0 +1 len_hiscall=i + iloop=0 -1 if(ndphi.eq.1) dphi=30*iloop/57.2957795 +2 if(ndphi.eq.1) dphi=30*iloop/57.2957795 do nqd=1,0,-1 if(nqd.eq.1) then fa=1000.0*(fselect+0.001*mousedf-100.0) - dftolerance @@ -170,9 +175,17 @@ subroutine map65a(newdat) nkm.eq.1) km=km-1 if(freq-freq0.gt.ftol .or. sync1.gt.sync10) then nflip=nint(flipk) - call decode1a(id(1,1,kbuf),newdat,nfilt,freq,nflip, & - mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi,ndphi, & + call decode1a(id(1,1,kbuf),newdat,nfilt,freq,nflip, & + mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi,ndphi, & ipol,sync2,a,dt,pol,nkv,nhist,qual,decoded) + +! If hiscall or hisgrid is in decoded message, save the pol'n angle. + i1=index(decoded,hiscall(1:len_hiscall)) + i2=index(decoded,hisgrid(1:4)) + 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 @@ -252,7 +265,7 @@ subroutine map65a(newdat) endif if(ndphi.eq.1 .and.iloop.lt.12) then iloop=iloop+1 - go to 1 + go to 2 endif if(nqd.eq.1) then write(11,*) '$EOF' diff --git a/recvpkt.F90 b/recvpkt.F90 index fc8a613b5..fae36300c 100644 --- a/recvpkt.F90 +++ b/recvpkt.F90 @@ -28,9 +28,11 @@ subroutine recvpkt(iarg) nreset=-1 k=0 nsec0=-999 + fcenter=144.125 !Default (startup) frequency) 10 call recv_pkt(center_freq) + if(nsec0.eq.-999) fcenter=center_freq isec=sec_midn() imin=isec/60 if((monitoring.eq.0) .or. (lauto.eq.1 .and. mod(imin,2).eq.(1-TxFirst))) then @@ -110,6 +112,7 @@ subroutine recvpkt(iarg) if(ns.eq.48) then nutc=mutc + fcenter=center_freq kbuf=kb kk=k ndiskdat=0