Added readout of Rx noise level.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@412 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-06-24 16:31:38 +00:00
parent a61262760e
commit 7fac2b6019
3 changed files with 14 additions and 4 deletions

View File

@ -6,6 +6,7 @@ real s2 !2d spectrum for horizontal waterfall GUI
real ccf !CCF in time (blue curve) Decoder real ccf !CCF in time (blue curve) Decoder
real green !Data for green line GUI real green !Data for green line GUI
real fselect !Specified QSO frequency GUI real fselect !Specified QSO frequency GUI
real rxnoise !Rx noise in dB recvpkt
integer ngreen !Length of green GUI integer ngreen !Length of green GUI
real dgain !Digital audio gain setting GUI real dgain !Digital audio gain setting GUI
integer iter !(why is this here??) integer iter !(why is this here??)
@ -89,7 +90,8 @@ character*12 pttport
character*8 utcdata !HHMM UTC for the processed data Decoder character*8 utcdata !HHMM UTC for the processed data Decoder
common/gcom2/ps0(431),psavg(450),s2(64,3100),ccf(-5:540), & common/gcom2/ps0(431),psavg(450),s2(64,3100),ccf(-5:540), &
green(500),fselect,ngreen,dgain,iter,ndecoding,ndecoding0,mousebutton, & green(500),fselect,rxnoise,ngreen,dgain,iter,ndecoding, &
ndecoding0,mousebutton, &
ndecdone,npingtime,ierr,lauto,mantx,nrestart,ntr,nmsg,nsave,nadd5, & ndecdone,npingtime,ierr,lauto,mantx,nrestart,ntr,nmsg,nsave,nadd5, &
dftolerance,LDecoded,rxdone,monitoring,nzap,nsavecum,minsigdb, & dftolerance,LDecoded,rxdone,monitoring,nzap,nsavecum,minsigdb, &
nclearave,nfreeze,nafc,newspec,nmode,mode65,nclip,ndebug,nblank,nport, & nclearave,nfreeze,nafc,newspec,nmode,mode65,nclip,ndebug,nblank,nport, &

View File

@ -1086,6 +1086,8 @@ def update():
t=time.strftime('%Y %b %d\n%H:%M:%S',utc) t=time.strftime('%Y %b %d\n%H:%M:%S',utc)
Audio.gcom2.utcdate=t[:12] Audio.gcom2.utcdate=t[:12]
ldate.configure(text=t) ldate.configure(text=t)
t="Rx noise: %.1f" % (Audio.gcom2.rxnoise - 16.0)
msg5.configure(text=t)
root_geom=root.geometry() root_geom=root.geometry()
try: try:
bm_geom=bm.geometry() bm_geom=bm.geometry()
@ -1750,8 +1752,8 @@ msg3=Message(iframe6,width=300,relief=SUNKEN)
msg3.pack(side=LEFT, fill=X, padx=1) msg3.pack(side=LEFT, fill=X, padx=1)
msg4=Message(iframe6, text="", width=300,relief=SUNKEN) msg4=Message(iframe6, text="", width=300,relief=SUNKEN)
msg4.pack(side=LEFT, fill=X, padx=1) msg4.pack(side=LEFT, fill=X, padx=1)
#msg5=Message(iframe6, text="", width=300,relief=SUNKEN) msg5=Message(iframe6, text="", width=300,relief=SUNKEN)
#msg5.pack(side=LEFT, fill=X, padx=1) msg5.pack(side=LEFT, fill=X, padx=1)
msg7=Message(iframe6, text=' ', width=300,relief=SUNKEN) msg7=Message(iframe6, text=' ', width=300,relief=SUNKEN)
msg7.pack(side=RIGHT, fill=X, padx=1) msg7.pack(side=RIGHT, fill=X, padx=1)
iframe6.pack(expand=1, fill=X, padx=4) iframe6.pack(expand=1, fill=X, padx=4)

View File

@ -21,6 +21,7 @@ subroutine recvpkt(iarg)
include 'gcom2.f90' include 'gcom2.f90'
equivalence (id,d8) equivalence (id,d8)
data nblock0/0/,first/.true./,kb/1/,ntx/0/ data nblock0/0/,first/.true./,kb/1/,ntx/0/
data sqave/0.0/,u/0.001/,rxnoise/0.0/
save save
! Open a socket to receive multicast data from Linrad ! Open a socket to receive multicast data from Linrad
@ -32,7 +33,7 @@ subroutine recvpkt(iarg)
10 call recv_pkt(center_freq) 10 call recv_pkt(center_freq)
lost=nblock-nblock0-1 lost=nblock-nblock0-1
if(lost.ne.0 .and. .not.first) then if(lost.ne.0 .and. .not.first) then
! print*,'Lost packets?',nblock,nblock0,lost ! print*,'Lost packets?',nblock,nblock0,lost,rxnoise
nlost=nlost + lost nlost=nlost + lost
do i=1,174*lost do i=1,174*lost
k=k+1 k=k+1
@ -58,10 +59,15 @@ subroutine recvpkt(iarg)
if(kb.eq.2 .and. (k+174).gt.2*NSMAX) go to 20 if(kb.eq.2 .and. (k+174).gt.2*NSMAX) go to 20
if(transmitting.eq.0) then if(transmitting.eq.0) then
sq=0.
do i=1,174 do i=1,174
k=k+1 k=k+1
d8(k)=buf8(i) d8(k)=buf8(i)
sq=sq + float(id(1,k,1))**2 + float(id(1,k,1))**2 + &
float(id(1,k,1))**2 + float(id(1,k,1))**2
enddo enddo
sqave=sqave + u*(sq-sqave)
rxnoise=10.0*log10(sqave) - 32.0
else else
do i=1,174 do i=1,174
k=k+1 k=k+1