mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-23 12:38:53 -04:00
Remove unused code from deep65.f, demod64a.f.
Add test for bad data to demod64a.f, extract.f, wsjt65.f. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@131 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
74c44596fd
commit
050556bbec
26
deep65.f
26
deep65.f
@ -12,7 +12,6 @@
|
||||
character*4 rpt(MAXRPT)
|
||||
logical first
|
||||
integer ncode(63,2*MAXCALLS)
|
||||
common/tmp8/ p(64,63)
|
||||
|
||||
data neme0/-99/
|
||||
data rpt/'-01','-02','-03','-04','-05',
|
||||
@ -101,26 +100,18 @@
|
||||
|
||||
p1=-1.e30
|
||||
ip1=0
|
||||
p2=-1.e30
|
||||
ip2=0
|
||||
do k=1,ntot
|
||||
C If sync=OOO, no CQ messages
|
||||
if(flip.lt.0.0 .and. testmsg(k)(1:3).eq.'CQ ') go to 30
|
||||
sum=0.
|
||||
sum2=0.
|
||||
do j=1,63
|
||||
i=ncode(j,k)+1
|
||||
sum=sum + s3(i,j)
|
||||
sum2=sum2 + p(i,j)
|
||||
enddo
|
||||
if(sum.gt.p1) then
|
||||
p1=sum
|
||||
ip1=k
|
||||
endif
|
||||
if(sum2.gt.p2) then
|
||||
p2=sum2
|
||||
ip2=k
|
||||
endif
|
||||
30 enddo
|
||||
|
||||
p1=p1/sum0
|
||||
@ -136,23 +127,6 @@ C If sync=OOO, no CQ messages
|
||||
decoded=testmsg(ip1)
|
||||
endif
|
||||
decoded(22:22)=c
|
||||
deepmsg=decoded
|
||||
|
||||
q2=0.27*p2 + 81.3
|
||||
! if(mode65.eq.1) qual=100.0*(p1-0.33)
|
||||
! if(mode65.eq.4) qual=100.0*(p1-0.50)
|
||||
if(q2.lt.0.) q2=0.
|
||||
if(q2.gt.10.) q2=10.
|
||||
decoded=' '
|
||||
c=' '
|
||||
if(q2.gt.0.0) then
|
||||
if(q2.lt.4.0) c='?'
|
||||
decoded=testmsg(ip2)
|
||||
endif
|
||||
decoded(22:22)=c
|
||||
|
||||
! qual=q2
|
||||
decoded=deepmsg
|
||||
|
||||
return
|
||||
end
|
||||
|
13
demod64a.f
13
demod64a.f
@ -1,5 +1,5 @@
|
||||
subroutine demod64a(signal,nadd,mrsym,mrprob,
|
||||
+ mr2sym,mr2prob)
|
||||
+ mr2sym,mr2prob,ntest,nlow)
|
||||
|
||||
C Demodulate the 64-bin spectra for each of 63 symbols in a frame.
|
||||
|
||||
@ -14,8 +14,6 @@ C mr2prob probability that mr2sym was the transmitted value
|
||||
real*4 signal(64,63)
|
||||
real*8 fs(64)
|
||||
integer mrsym(63),mrprob(63),mr2sym(63),mr2prob(63)
|
||||
real*4 p
|
||||
common/tmp8/ p(64,63)
|
||||
|
||||
afac=1.1 * float(nadd)**0.64
|
||||
scale=255.999
|
||||
@ -49,7 +47,6 @@ C Compute probabilities for most reliable symbol values
|
||||
s2=signal(i,j)
|
||||
i2=i !Second most reliable
|
||||
endif
|
||||
p(i,j)=log(fs(i)/fsum)
|
||||
enddo
|
||||
p1=fs(i1)/fsum !Normalized probabilities
|
||||
p2=fs(i2)/fsum
|
||||
@ -59,5 +56,13 @@ C Compute probabilities for most reliable symbol values
|
||||
mr2prob(j)=scale*p2
|
||||
enddo
|
||||
|
||||
sum=0.
|
||||
nlow=0
|
||||
do j=1,63
|
||||
sum=sum+mrprob(j)
|
||||
if(mrprob(j).le.5) nlow=nlow+1
|
||||
enddo
|
||||
ntest=sum/63
|
||||
|
||||
return
|
||||
end
|
||||
|
@ -9,7 +9,13 @@
|
||||
data first/.true./,nsec1/0/
|
||||
save
|
||||
|
||||
call demod64a(s3,nadd,mrsym,mrprob,mr2sym,mr2prob)
|
||||
call demod64a(s3,nadd,mrsym,mrprob,mr2sym,mr2prob,ntest,nlow)
|
||||
|
||||
if(ntest.lt.50 .or. nlow.gt.20) then
|
||||
ncount=-999 !Flag bad data
|
||||
go to 900
|
||||
endif
|
||||
|
||||
call graycode(mrsym,63,-1)
|
||||
call interleave63(mrsym,-1)
|
||||
call interleave63(mrprob,-1)
|
||||
|
2
wsjt.py
2
wsjt.py
@ -1,4 +1,4 @@
|
||||
#----------------------------------------------------------------- WSJT
|
||||
#---------------------------------------------------------------- WSJT
|
||||
from Tkinter import *
|
||||
from tkFileDialog import *
|
||||
import Pmw
|
||||
|
4
wsjt65.f
4
wsjt65.f
@ -126,6 +126,10 @@ C result from the Reed-Solomon decoder.
|
||||
call decode65(dat,npts,dtxx,dfxx,flip,ndepth,neme,nsked,
|
||||
+ mycall,hiscall,hisgrid,mode65,lmid,ftrack,decoded,
|
||||
+ ncount,deepmsg,qual)
|
||||
if(ncount.eq.-999) then
|
||||
qbest=0 !Bad data
|
||||
go to 200
|
||||
endif
|
||||
if(qual.gt.qbest) then
|
||||
qbest=qual
|
||||
dtbest=dtxx
|
||||
|
Loading…
Reference in New Issue
Block a user