mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-14 07:35:17 -04:00
Remove unused code from sh65.f90. Make csync a 2-character flag.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6666 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
8cef34fe11
commit
a402645e75
@ -1,6 +1,6 @@
|
|||||||
subroutine decode65a(dd,npts,newdat,nqd,f0,nflip,mode65,ntrials, &
|
subroutine decode65a(dd,npts,newdat,nqd,f0,nflip,mode65,ntrials, &
|
||||||
naggressive,ndepth,ntol,mycall,hiscall,hisgrid,nexp_decode, &
|
naggressive,ndepth,ntol,mycall,hiscall,hisgrid,nexp_decode, &
|
||||||
single_decode,sync2,a,dt,nft,qual,nhist,nsmo,decoded)
|
single_decode,sync2,a,dt,nft,nspecial,qual,nhist,nsmo,decoded)
|
||||||
|
|
||||||
! Apply AFC corrections to a candidate JT65 signal, then decode it.
|
! Apply AFC corrections to a candidate JT65 signal, then decode it.
|
||||||
|
|
||||||
@ -31,15 +31,11 @@ subroutine decode65a(dd,npts,newdat,nqd,f0,nflip,mode65,ntrials, &
|
|||||||
|
|
||||||
! Check for a shorthand message
|
! Check for a shorthand message
|
||||||
if(single_decode) then
|
if(single_decode) then
|
||||||
call sh65(cx,n5,mode65,ntol,xdf,nspecial,snrdb)
|
call sh65(cx,n5,mode65,ntol,xdf,nspecial,sync2)
|
||||||
if(nspecial.gt.0) then
|
if(nspecial.gt.0) then
|
||||||
a=0.
|
a=0.
|
||||||
a(1)=xdf
|
a(1)=xdf
|
||||||
if(nspecial.eq.2) decoded='RO'
|
|
||||||
if(nspecial.eq.3) decoded='RRR'
|
|
||||||
if(nspecial.eq.4) decoded='73'
|
|
||||||
nflip=0
|
nflip=0
|
||||||
sync2=snrdb
|
|
||||||
go to 900
|
go to 900
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -229,7 +229,7 @@ contains
|
|||||||
integer i,n
|
integer i,n
|
||||||
character*5 ctail
|
character*5 ctail
|
||||||
character*22 decoded
|
character*22 decoded
|
||||||
character*1 csync
|
character*2 csync
|
||||||
character*36 c
|
character*36 c
|
||||||
data c/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
|
data c/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
|
||||||
|
|
||||||
@ -256,11 +256,11 @@ contains
|
|||||||
if(qual.lt.3) decoded(21:21)='?'
|
if(qual.lt.3) decoded(21:21)='?'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
csync=' '
|
csync='# '
|
||||||
if(nflip.ne.0 .and. sync.ge.max(0.0,float(minsync))) then
|
if(nflip.ne.0 .and. sync.ge.max(0.0,float(minsync))) then
|
||||||
csync='*'
|
csync='#*'
|
||||||
if(nflip.eq.-1) then
|
if(nflip.eq.-1) then
|
||||||
csync='#'
|
csync='##'
|
||||||
if(decoded.ne.' ') then
|
if(decoded.ne.' ') then
|
||||||
do i=22,1,-1
|
do i=22,1,-1
|
||||||
if(decoded(i:i).ne.' ') exit
|
if(decoded(i:i).ne.' ') exit
|
||||||
@ -270,7 +270,7 @@ contains
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
write(*,1010) utc,snr,dt,freq,csync,decoded,ctail
|
write(*,1010) utc,snr,dt,freq,csync,decoded,ctail
|
||||||
1010 format(i4.4,i4,f5.1,i5,1x,a1,1x,a22,a5)
|
1010 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,a5)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
write(13,1012) utc,nint(sync),snr,dt,float(freq),drift,decoded,ft,nsum,nsmo
|
write(13,1012) utc,nint(sync),snr,dt,float(freq),drift,decoded,ft,nsum,nsmo
|
||||||
|
@ -196,8 +196,11 @@ contains
|
|||||||
call timer('decod65a',0)
|
call timer('decod65a',0)
|
||||||
call decode65a(dd,npts,first_time,nqd,freq,nflip,mode65,nvec, &
|
call decode65a(dd,npts,first_time,nqd,freq,nflip,mode65,nvec, &
|
||||||
naggressive,ndepth,ntol,mycall,hiscall,hisgrid, &
|
naggressive,ndepth,ntol,mycall,hiscall,hisgrid, &
|
||||||
nexp_decode,single_decode,sync2,a,dtx,nft,qual,nhist, &
|
nexp_decode,single_decode,sync2,a,dtx,nft,nspecial,qual, &
|
||||||
nsmo,decoded)
|
nhist,nsmo,decoded)
|
||||||
|
if(nspecial.eq.2) decoded='RO'
|
||||||
|
if(nspecial.eq.3) decoded='RRR'
|
||||||
|
if(nspecial.eq.4) decoded='73'
|
||||||
call timer('decod65a',1)
|
call timer('decod65a',1)
|
||||||
if(sync1.lt.float(minsync) .and. &
|
if(sync1.lt.float(minsync) .and. &
|
||||||
decoded.eq.' ') nflip=0
|
decoded.eq.' ') nflip=0
|
||||||
@ -218,6 +221,7 @@ contains
|
|||||||
ndrift=nint(2.0*a(2))
|
ndrift=nint(2.0*a(2))
|
||||||
if(single_decode) then
|
if(single_decode) then
|
||||||
s2db=sync1 - 30.0 + db(width/3.3) !### VHF/UHF/microwave
|
s2db=sync1 - 30.0 + db(width/3.3) !### VHF/UHF/microwave
|
||||||
|
if(nspecial.gt.0) s2db=sync2
|
||||||
else
|
else
|
||||||
s2db=10.0*log10(sync2) - 35 !### empirical (HF)
|
s2db=10.0*log10(sync2) - 35 !### empirical (HF)
|
||||||
endif
|
endif
|
||||||
|
44
lib/sh65.f90
44
lib/sh65.f90
@ -73,38 +73,22 @@ subroutine sh65(cx,n5,mode65,ntol,xdf,nspecial,snrdb)
|
|||||||
if(n2best.gt.8) n2best=nbest-4
|
if(n2best.gt.8) n2best=nbest-4
|
||||||
xdf=min(ipk(nbest),ipk(n2best))*df
|
xdf=min(ipk(nbest),ipk(n2best))*df
|
||||||
nspecial=0
|
nspecial=0
|
||||||
if(abs(xdf).gt.ntol) go to 10
|
if(abs(xdf).le.ntol) then
|
||||||
|
idiff=abs(ipk(nbest)-ipk(n2best))
|
||||||
idiff=abs(ipk(nbest)-ipk(n2best))
|
xk=float(idiff)/nfac
|
||||||
xk=float(idiff)/nfac
|
k=nint(xk)
|
||||||
k=nint(xk)
|
iderr=nint((xk-k)*nfac)
|
||||||
iderr=nint((xk-k)*nfac)
|
maxerr=nint(0.008*abs(idiff) + 0.51)
|
||||||
maxerr=nint(0.008*abs(idiff) + 0.51)
|
if(abs(iderr).le.maxerr .and. k.ge.2 .and. k.le.4) nspecial=k
|
||||||
if(abs(iderr).le.maxerr .and. k.ge.2 .and. k.le.4) nspecial=k
|
snrdb=-30.0
|
||||||
nstest=0
|
if(nspecial.gt.0) then
|
||||||
if(nspecial.gt.0) then
|
call sh65snr(ss(ia2,nbest),ib2-ia2+1,snr1)
|
||||||
call sh65snr(ss(ia2,nbest),ib2-ia2+1,snr1)
|
call sh65snr(ss(ia2,n2best),ib2-ia2+1,snr2)
|
||||||
call sh65snr(ss(ia2,n2best),ib2-ia2+1,snr2)
|
snr=0.5*(snr1+snr2)
|
||||||
snr=0.5*(snr1+snr2)
|
snrdb=db(snr) - db(2500.0/df) - db(sqrt(nblks/4.0)) + 8.0
|
||||||
if(snr.gt.snrbest) then
|
|
||||||
snrbest=snr
|
|
||||||
nspecialbest=nspecial
|
|
||||||
nstest=snr/2.0 - 2.0 !Threshold set here
|
|
||||||
if(nstest.lt.0) nstest=0
|
|
||||||
if(nstest.gt.10) nstest=10
|
|
||||||
dfsh=nint(xdf)
|
|
||||||
iderrbest=iderr
|
|
||||||
snrdb=db(snr) - db(2500.0/df) - db(sqrt(nblks/4.0))+1.8
|
|
||||||
n1=nbest
|
|
||||||
n2=n2best
|
|
||||||
ipk1=ipk(n1)
|
|
||||||
ipk2=ipk(n2)
|
|
||||||
endif
|
endif
|
||||||
|
if(snr1.lt.4.0 .or. snr2.lt.4.0 .or. snr.lt.5.0) nspecial=0
|
||||||
endif
|
endif
|
||||||
if(nstest.eq.0) nspecial=0
|
|
||||||
10 continue
|
|
||||||
|
|
||||||
! print*,'a',ia2,ib2,snrdb,xdf,nspecial
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine sh65
|
end subroutine sh65
|
||||||
|
Loading…
x
Reference in New Issue
Block a user