mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-26 22:28:41 -05:00
Working on the T/R sequencing. This is better, I think. No "blackouts".
But still can be improved ... Perhaps accept packets from Linrad even while transmitting, but zero them out? Then might still be able to decode a sequence interrupted by a short, aborted, trenamission? git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@989 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
6e6051d924
commit
239a0df244
6
map65.py
6
map65.py
@ -977,10 +977,10 @@ def update():
|
|||||||
ldate.configure(text=t)
|
ldate.configure(text=t)
|
||||||
t="Rx noise: %.1f dB" % Audio.gcom2.rxnoise
|
t="Rx noise: %.1f dB" % Audio.gcom2.rxnoise
|
||||||
msg4.configure(text=t)
|
msg4.configure(text=t)
|
||||||
t="Drop: %.2f %%" % Audio.gcom2.pctlost
|
## t="Drop: %.2f %%" % Audio.gcom2.pctlost
|
||||||
|
## msg5.configure(text=t)
|
||||||
|
t="%d %d %d" % (Audio.datcom.kbuf,Audio.datcom.kk,Audio.datcom.kxp/96000)
|
||||||
msg5.configure(text=t)
|
msg5.configure(text=t)
|
||||||
## t="%d %d %d" % (Audio.datcom.kbuf,Audio.datcom.kk,Audio.datcom.kxp/96000)
|
|
||||||
## msg7.configure(text=t)
|
|
||||||
root_geom=root.geometry()
|
root_geom=root.geometry()
|
||||||
try:
|
try:
|
||||||
bm_geom=bm.geometry()
|
bm_geom=bm.geometry()
|
||||||
|
51
recvpkt.F90
51
recvpkt.F90
@ -15,7 +15,7 @@ subroutine recvpkt(iarg)
|
|||||||
include 'gcom1.f90'
|
include 'gcom1.f90'
|
||||||
include 'gcom2.f90'
|
include 'gcom2.f90'
|
||||||
equivalence (id,d8)
|
equivalence (id,d8)
|
||||||
data nblock0/0/,first/.true./,kb/1/,npkt/0/,nw/0/
|
data nblock0/0/,first/.true./,kb/1/,npkt/0/,nw/0/,nseq/0/
|
||||||
data sqave/0.0/,u/0.001/,rxnoise/0.0/,kbuf/1/,lost_tot/0/
|
data sqave/0.0/,u/0.001/,rxnoise/0.0/,kbuf/1/,lost_tot/0/
|
||||||
data multicast0/-99/
|
data multicast0/-99/
|
||||||
save
|
save
|
||||||
@ -31,15 +31,23 @@ subroutine recvpkt(iarg)
|
|||||||
|
|
||||||
call recv_pkt(center_freq)
|
call recv_pkt(center_freq)
|
||||||
fcenter=center_freq
|
fcenter=center_freq
|
||||||
|
nsec=mod(Tsec,86400.d0)
|
||||||
|
|
||||||
! Wait for an even minute to start accepting Rx data.
|
! Wait for start of a minute to begin accepting Rx data.
|
||||||
|
! (Alternative: wreset buffer pointers at start of minute?)
|
||||||
if(nsec0.eq.-999) then
|
if(nsec0.eq.-999) then
|
||||||
if(mod(msec/1000,60).ne.0) go to 10
|
if(mod(nsec,60).ne.0) go to 10
|
||||||
nsec0=-998
|
nsec0=-998
|
||||||
endif
|
endif
|
||||||
|
|
||||||
isec=sec_midn()
|
isec=sec_midn()
|
||||||
imin=isec/60
|
imin=isec/60
|
||||||
|
|
||||||
|
if(transmitting.eq.1) then
|
||||||
|
ndone1=0
|
||||||
|
ndone2=0
|
||||||
|
endif
|
||||||
|
|
||||||
if((monitoring.eq.0) .or. (lauto.eq.1 .and. mod(imin,2).eq.(1-TxFirst))) then
|
if((monitoring.eq.0) .or. (lauto.eq.1 .and. mod(imin,2).eq.(1-TxFirst))) then
|
||||||
first=.true.
|
first=.true.
|
||||||
|
|
||||||
@ -58,6 +66,8 @@ subroutine recvpkt(iarg)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
! If we get here, we're in Rx mode
|
! If we get here, we're in Rx mode
|
||||||
|
|
||||||
|
! Check for lost packets
|
||||||
lost=nblock-nblock0-1
|
lost=nblock-nblock0-1
|
||||||
if(lost.ne.0 .and. .not.first) then
|
if(lost.ne.0 .and. .not.first) then
|
||||||
nb=nblock
|
nb=nblock
|
||||||
@ -72,8 +82,10 @@ subroutine recvpkt(iarg)
|
|||||||
endif
|
endif
|
||||||
nblock0=nblock
|
nblock0=nblock
|
||||||
|
|
||||||
nsec=msec/1000
|
if(mod(nsec,60).eq.1 .or. transmitting) nreset=1
|
||||||
if(mod(nsec,60).eq.1) nreset=1
|
tdiff=mod(0.001d0*msec,60.d0)-mod(Tsec,60.d0)
|
||||||
|
if(tdiff.lt.-30.) tdiff=tdiff+60.
|
||||||
|
if(tdiff.gt.30.) tdiff=tdiff-60.
|
||||||
|
|
||||||
! If this is the start of a new minute, switch buffers
|
! If this is the start of a new minute, switch buffers
|
||||||
if(mod(nsec,60).eq.0 .and. nreset.eq.1) then
|
if(mod(nsec,60).eq.0 .and. nreset.eq.1) then
|
||||||
@ -84,11 +96,18 @@ subroutine recvpkt(iarg)
|
|||||||
lost_tot=0
|
lost_tot=0
|
||||||
ndone1=0
|
ndone1=0
|
||||||
ndone2=0
|
ndone2=0
|
||||||
|
nseq=nseq+1
|
||||||
|
kxp=k
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if(kb.eq.1 .and. (k+174).gt.NSMAX) go to 20
|
! Test for buffer full
|
||||||
if(kb.eq.2 .and. (k+174).gt.2*NSMAX) go to 20
|
if((kb.eq.1 .and. (k+174).gt.NSMAX) .or. &
|
||||||
|
(kb.eq.2 .and. (k+174).gt.2*NSMAX)) then
|
||||||
|
print*,'Recvpkt:',kb,k,NSMAX
|
||||||
|
go to 20
|
||||||
|
endif
|
||||||
|
|
||||||
|
! Move data into Rx buffer and compute average signal level.
|
||||||
sq=0.
|
sq=0.
|
||||||
do i=1,174
|
do i=1,174
|
||||||
k=k+1
|
k=k+1
|
||||||
@ -130,13 +149,15 @@ subroutine recvpkt(iarg)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
20 if(nsec.ne.nsec0) then
|
20 if(nsec.ne.nsec0) then
|
||||||
mutch=nsec/3600
|
|
||||||
mutcm=mod(nsec/60,60)
|
|
||||||
mutc=100*mutch + mutcm
|
|
||||||
ns=mod(nsec,60)
|
|
||||||
nsec0=nsec
|
nsec0=nsec
|
||||||
|
|
||||||
|
nseclr=msec/1000
|
||||||
|
mutch=nseclr/3600
|
||||||
|
mutcm=mod(nseclr/60,60)
|
||||||
|
mutc=100*mutch + mutcm
|
||||||
|
|
||||||
! See if it's time to start FFTs
|
! See if it's time to start FFTs
|
||||||
|
ns=mod(nsec,60)
|
||||||
if(ns.ge.nt1 .and. ndone1.eq.0) then
|
if(ns.ge.nt1 .and. ndone1.eq.0) then
|
||||||
nutc=mutc
|
nutc=mutc
|
||||||
fcenter=center_freq
|
fcenter=center_freq
|
||||||
@ -147,11 +168,17 @@ subroutine recvpkt(iarg)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
! See if it's time to start second stage of processing
|
! See if it's time to start second stage of processing
|
||||||
if(ns.ge.nt2 .and. ndone2.eq.0) then
|
! if(ns.ge.nt2 .and. ndone2.eq.0) then
|
||||||
|
if(ns.ge.nt2) then
|
||||||
kk=k
|
kk=k
|
||||||
ndone2=1
|
ndone2=1
|
||||||
nlost=lost_tot ! Save stats for printout
|
nlost=lost_tot ! Save stats for printout
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
! if(ns.le.5 .or. ns.ge.46) write(*,3001) ns,ndone1,ndone2,kb, &
|
||||||
|
! kbuf,nreset,kk,tdiff
|
||||||
|
!3001 format(6i4,i12,f8.2)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
first=.false.
|
first=.false.
|
||||||
go to 10
|
go to 10
|
||||||
|
8
spec.f90
8
spec.f90
@ -107,10 +107,10 @@ subroutine spec(brightness,contrast,ngain,nspeed,a,a2)
|
|||||||
imid0=nint(1000.0*(fmid-125.0+48.0)/df) - nbpp/2 !Last term is empirical
|
imid0=nint(1000.0*(fmid-125.0+48.0)/df) - nbpp/2 !Last term is empirical
|
||||||
i0=imid-375
|
i0=imid-375
|
||||||
ii0=imid0-375*nbpp
|
ii0=imid0-375*nbpp
|
||||||
if(nfullspec.eq.1) then
|
! if(nfullspec.eq.1) then
|
||||||
nbpp=NFFT/NX
|
! nbpp=NFFT/NX
|
||||||
ii0=0
|
! ii0=0
|
||||||
endif
|
! endif
|
||||||
|
|
||||||
k=0
|
k=0
|
||||||
do j=nlines,1,-1 !Reverse order so last will be on top
|
do j=nlines,1,-1 !Reverse order so last will be on top
|
||||||
|
Loading…
Reference in New Issue
Block a user