Extended DT search range.

Tried to locate optimizing problem in deep65; used the kludge fix.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@424 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-06-27 16:25:32 +00:00
parent 194224d765
commit 7e3d8b47e2
5 changed files with 9 additions and 137 deletions

77
afc65.f
View File

@ -1,77 +0,0 @@
subroutine afc65(s2,ipk,lagpk,flip,ftrack)
real s2(1024,320)
real s(-10:10)
real x(63),y(63),z(63)
real ftrack(126)
include 'prcom.h'
data s/21*0.0/
k=0
u=1.0
u1=0.2
fac=sqrt(1.0/u1)
do j=1,126
if(pr(j)*flip .lt. 0.0) go to 10
k=k+1
m=2*j-1+lagpk
if(m.lt.1 .or. m.gt.320) go to 10
smax=0.
do i=-10,10
s(i)=(1.0-u)*s(i) + u*s2(ipk+i,m)
if(s(i).gt.smax) then
smax=s(i)
ipk2=i
endif
enddo
u=u1
dfx=0.0
sig=100.0*fac*smax
if(ipk2.gt.-10 .and. ipk2.lt.10 .and. (sig.gt.2.0))
+ call peakup(s(ipk2-1),s(ipk2),s(ipk2+1),dfx)
dfx=ipk2+dfx
x(k)=j
y(k)=dfx
z(k)=sig
if(z(k).lt.1.5 .or. abs(y(k)).gt.5.5) then
y(k)=0.
z(k)=0.
endif
10 enddo
zlim=5.0
yfit=0.
k=0
do j=1,126
if(pr(j)*flip .lt. 0.0) go to 30
k=k+1
sumy=0.
sumz=0.
if(k.ge.1) then
sumz=z(k)
sumy=sumy+z(k)*y(k)
endif
do n=1,30
m=k-n
if(m.ge.1) then
sumz=sumz+z(m)
sumy=sumy+z(m)*y(m)
endif
m=k+n
if(m.le.63) then
sumz=sumz+z(m)
sumy=sumy+z(m)*y(m)
endif
if(sumz.ge.zlim) go to 20
enddo
n=30
20 yfit=0.
if(sumz.gt.0.0) yfit=sumy/sumz
30 ftrack(j)=yfit*2.691650
enddo
if(ftrack(1).eq.99.0) ftrack(1)=ftrack(2)
return
end

2
ccf2.f
View File

@ -1,7 +1,7 @@
subroutine ccf2(ss,nz,nflip,ccfbest,lagpk)
! parameter (LAGMAX=20)
parameter (LAGMAX=100)
parameter (LAGMAX=200)
real ss(nz)
real ccf(-LAGMAX:LAGMAX)
integer npr(126)

View File

@ -1,54 +0,0 @@
subroutine decode65(dat,npts,dtx,dfx,flip,ndepth,neme,nsked,
+ mycall,hiscall,hisgrid,mode65,nafc,decoded,ncount,
+ deepmsg,qual)
C Decodes JT65 data, assuming that DT and DF have already been determined.
real dat(npts) !Raw data
real s2(77,126)
real s3(64,63)
real ftrack(126)
character decoded*22,deepmsg*22
character mycall*12,hiscall*12,hisgrid*6
include 'avecom.h'
include 'prcom.h'
save
dt=2.0/11025.0 !Sample interval (2x downsampled data)
istart=nint(dtx/dt) !Start index for synced FFTs
nsym=126
C Compute spectra of the channel symbols
f0=1270.46 + dfx
call spec2d65(dat,npts,nsym,flip,istart,f0,ftrack,nafc,mode65,s2)
do j=1,63
k=mdat(j) !Points to data symbol
if(flip.lt.0.0) k=mdat2(j)
do i=1,64
s3(i,j)=s2(i+7,k)
enddo
enddo
nadd=mode65
call extract(s3,nadd,ncount,decoded) !Extract the message
qual=0.
if(ndepth.ge.1) call deep65(s3,mode65,neme,
+ nsked,flip,mycall,hiscall,hisgrid,deepmsg,qual)
print*,ndepth,qual,deepmsg
if(ncount.lt.0) decoded=' '
C Suppress "birdie messages":
if(decoded(1:7).eq.'000AAA ') decoded=' '
if(decoded(1:7).eq.'0L6MWK ') decoded=' '
C Save symbol spectra for possible decoding of average.
do j=1,63
k=mdat(j)
if(flip.lt.0.0) k=mdat2(j)
call move(s2(8,k),ppsave(1,j,nsave),64)
enddo
return
end

View File

@ -143,10 +143,13 @@ C Insert CQ message
if(pp(i).gt.p2 .and. pp(i).ne.p1) p2=pp(i)
enddo
C ### Find out why this needs to be here ###
C ### It's OK without it, in Linux, if compiled without optimization.
! rewind 77
! write(77,*) p1,p2
C ### DO NOT REMOVE ###
rewind 77
write(77,*) p1,p2
C ### Works OK without it (in both Windows and Linux) if compiled
C ### without optimization. However, in Windows this is a colossal
C ### pain because of the way McMillan Installer wants to run the
C ### compile step.
if(mode65.eq.1) bias=max(1.12*p2,0.335)
if(mode65.eq.2) bias=max(1.08*p2,0.405)

View File

@ -1,4 +1,4 @@
#--------------------------------------------------------------------- MAP65
#---------------------------------------------------------------------- MAP65
# $Date$ $Revision$
#
from Tkinter import *