mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-26 06:08:42 -05:00
Changes to make it possible to decode JT65 over a much wider range of DF.
Sync tone can now be anywhere in the range 200-4300 Hz (approx). NB: this is experimental, needs thorough testing! git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@290 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
3cc8cc54bb
commit
db254d4e32
@ -59,7 +59,7 @@ subroutine decode3(d2,jz,istart,filename)
|
||||
endif
|
||||
call wsjt1(d2d,jz,istart,samfacin,FileID,ndepth,MinSigdB, &
|
||||
NQRN,DFTolerance,MouseButton,NClearAve, &
|
||||
nMode,NFreeze,NAFC,NZap,mode65, &
|
||||
nMode,NFreeze,NAFC,NZap,mode65,idf, &
|
||||
MyCall,HisCall,HisGrid,neme,nsked,ntx2,s2, &
|
||||
ps0,npkept,lumsg,basevb,rmspower,nslim2,psavg,ccf,Nseg, &
|
||||
MouseDF,NAgain,LDecoded,nspecial,ndf,ss1,ss2)
|
||||
|
@ -58,6 +58,7 @@ integer ntime !Integer Unix time (now) SoundIn
|
||||
integer idinterval !Interval between CWIDs, minutes GUI
|
||||
integer msmax !(why is this here?)
|
||||
integer lenappdir !Length of Appdir string GUI
|
||||
integer idf !Frequency offset in Hz Decoder
|
||||
integer ndiskdat !1 if data read from disk, 0 otherwise GUI
|
||||
integer nlines !Available lines of waterfall data GUI
|
||||
integer nflat !Is waterfall to be flattened? GUI
|
||||
@ -91,7 +92,7 @@ common/gcom2/ps0(431),psavg(450),s2(64,3100),ccf(-5:540), &
|
||||
nclearave,nfreeze,nafc,nmode,mode65,nclip,ndebug,nblank,nport, &
|
||||
mousedf,neme,nsked,naggressive,ntx2,nslim2,nagain,nsavelast, &
|
||||
shok,sendingsh,d2a(661500),d2b(661500),b(60000),jza,jzb,ntime, &
|
||||
idinterval,msmax,lenappdir,ndiskdat,nlines,nflat,ntxreq,ntxnow, &
|
||||
idinterval,msmax,lenappdir,idf,ndiskdat,nlines,nflat,ntxreq,ntxnow, &
|
||||
ndepth,nspecial,ndf,nfmid,nfrange,ss1(-224:224),ss2(-224:224), &
|
||||
mycall,hiscall,hisgrid,txmsg,sending,mode,fname0,fnamea, &
|
||||
fnameb,decodedfile,AppDir,filetokilla,filetokillb,utcdate,pttport
|
||||
|
71
lpf1.f
71
lpf1.f
@ -1,19 +1,64 @@
|
||||
subroutine lpf1(data,n,nz)
|
||||
subroutine lpf1(dat,jz,nz,mousedf,mousedf2)
|
||||
|
||||
C Half-band lowpass filter and decimate by 2.
|
||||
parameter (NMAX=1024*1024)
|
||||
parameter (NMAXH=NMAX)
|
||||
real dat(jz),x(NMAX)
|
||||
complex c(0:NMAXH)
|
||||
equivalence (x,c)
|
||||
|
||||
real data(n)
|
||||
C Find FFT length
|
||||
xn=log(float(jz))/log(2.0)
|
||||
n=xn
|
||||
if((xn-n).gt.0.) n=n+1
|
||||
nfft=2**n
|
||||
nh=nfft/2
|
||||
|
||||
nz=n/2 -10
|
||||
do i=1,nz
|
||||
j=2*i+8
|
||||
data(i)=0.047579*(data(j-9)+data(j+9))
|
||||
+ - 0.073227*(data(j-7)+data(j+7))
|
||||
+ + 0.113449*(data(j-5)+data(j+5))
|
||||
+ - 0.204613*(data(j-3)+data(j+3))
|
||||
+ + 0.633339*(data(j-1)+data(j+1))
|
||||
+ + data(j)
|
||||
C Load data into real array x; pad with zeros up to nfft.
|
||||
do i=1,jz
|
||||
x(i)=dat(i)
|
||||
enddo
|
||||
if(nfft.gt.jz) call zero(x(jz+1),nfft-jz)
|
||||
C Do the FFT
|
||||
call xfft(x,nfft)
|
||||
df=11025.0/nfft
|
||||
|
||||
ia=70/df
|
||||
do i=0,ia
|
||||
c(i)=0.
|
||||
enddo
|
||||
ia=5000.0/df
|
||||
do i=ia,nh
|
||||
c(i)=0.
|
||||
enddo
|
||||
|
||||
C See if frequency needs to be shifted:
|
||||
ndf=0
|
||||
if(mousedf.lt.-600) ndf=-670
|
||||
if(mousedf.gt.600) ndf=1000
|
||||
if(mousedf.gt.1600) ndf=2000
|
||||
if(mousedf.gt.2600) ndf=3000
|
||||
|
||||
if(ndf.ne.0) then
|
||||
C Shift frequency up or down by ndf Hz:
|
||||
i0=nint(ndf/df)
|
||||
if(i0.lt.0) then
|
||||
do i=nh,-i0,-1
|
||||
c(i)=c(i+i0)
|
||||
enddo
|
||||
else
|
||||
do i=0,nh-i0
|
||||
c(i)=c(i+i0)
|
||||
enddo
|
||||
endif
|
||||
endif
|
||||
|
||||
mousedf2=mousedf-ndf !Adjust mousedf
|
||||
call four2a(c,nh,1,1,-1) !Return to time domain
|
||||
fac=1.0/nfft
|
||||
nz=jz/2
|
||||
do i=1,nz
|
||||
dat(i)=fac*x(i)
|
||||
enddo
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -413,10 +413,8 @@ def draw_axis():
|
||||
dx=375 + (1270.5-fmid)/(2*df)
|
||||
dff=2*df
|
||||
if Audio.gcom2.nfreeze==0:
|
||||
# x1=-600/dff + dx
|
||||
# x2=600/dff + dx
|
||||
x1=0
|
||||
x2=749
|
||||
x1=(Audio.gcom2.mousedf-600)/dff + dx
|
||||
x2=(Audio.gcom2.mousedf+600)/dff + dx
|
||||
else:
|
||||
tol=Audio.gcom2.dftolerance
|
||||
x1=(Audio.gcom2.mousedf-tol)/dff + dx
|
||||
|
10
wsjt.py
10
wsjt.py
@ -998,7 +998,8 @@ def dtdf_change(event):
|
||||
elif (event.y>=40 and event.y<95) or \
|
||||
(event.y<95 and Audio.gcom2.nspecial>0):
|
||||
lab1.configure(text='DF (Hz)',bg='red')
|
||||
t="%d" % int(1200.0*event.x/500.0-600.0,)
|
||||
idf=Audio.gcom2.idf
|
||||
t="%d" % int(idf+1200.0*event.x/500.0-600.0,)
|
||||
lab6.configure(text=t,bg="red")
|
||||
else:
|
||||
lab1.configure(text='Time (s)',bg='green')
|
||||
@ -1389,8 +1390,11 @@ def update():
|
||||
|
||||
msg1.configure(text="%6.4f %6.4f" % (samfac_in,samfac_out))
|
||||
msg2.configure(text=mode.get())
|
||||
t="Freeze DF:%4d" % (int(Audio.gcom2.mousedf),)
|
||||
msg3.configure(text=t)
|
||||
t="FrzDF:%4d" % (int(Audio.gcom2.mousedf),)
|
||||
if abs(int(Audio.gcom2.mousedf))>600:
|
||||
msg3.configure(text=t,fg='black',bg='red')
|
||||
else:
|
||||
msg3.configure(text=t,fg='black',bg='gray85')
|
||||
bdecode.configure(bg='gray85')
|
||||
if Audio.gcom2.ndecoding: #Set button bg=light_blue
|
||||
bdecode.configure(bg='#66FFFF') #while decoding
|
||||
|
9
wsjt1.F
9
wsjt1.F
@ -1,6 +1,6 @@
|
||||
subroutine wsjt1(d,jz0,istart,samfacin,FileID,ndepth,MinSigdB,
|
||||
+ NQRN,DFTolerance,MouseButton,NClearAve,
|
||||
+ Mode,NFreeze,NAFC,NZap,mode65,
|
||||
+ Mode,NFreeze,NAFC,NZap,mode65,idf,
|
||||
+ MyCall,HisCall,HisGrid,neme,nsked,ntx2,s2,
|
||||
+ ps0,npkept,lumsg,basevb,rmspower,nslim2,psavg,ccf,Nseg,
|
||||
+ MouseDF,NAgain,LDecoded,nspecial,ndf,ss1,ss2)
|
||||
@ -171,11 +171,12 @@ C Intentionally degrade SNR by -nclip dB.
|
||||
+ DFTolerance,mode65,nspecial,nstest,dfsh,iderrsh,
|
||||
+ idriftsh,snrsh,ss1,ss2,nwsh)
|
||||
! Lowpass filter and decimate by 2
|
||||
call lpf1(dat,jz,jz2)
|
||||
call lpf1(dat,jz,jz2,MouseDF,MouseDF2)
|
||||
idf=mousedf-mousedf2
|
||||
jz=jz2
|
||||
nadd=1
|
||||
fzap(1)=0.
|
||||
if(nzap.eq.1) call avesp2(dat,jz,nadd,mode,NFreeze,MouseDF,
|
||||
if(nzap.eq.1) call avesp2(dat,jz,nadd,mode,NFreeze,MouseDF2,
|
||||
+ DFTolerance,fzap)
|
||||
if(nzap.eq.1.and.nstest.eq.0) call bzap(dat,jz,nadd,mode,fzap)
|
||||
|
||||
@ -189,7 +190,7 @@ C Intentionally degrade SNR by -nclip dB.
|
||||
! Offset data by about 1 s.
|
||||
if(jz.ge.126*2048) call wsjt65(dat(4097),jz-4096,cfile6,
|
||||
+ NClearAve,MinSigdB,DFTolerance,NFreeze,NAFC,mode65,Nseg,
|
||||
+ MouseDF,NAgain,ndepth,neme,nsked,
|
||||
+ MouseDF2,NAgain,ndepth,neme,nsked,idf,
|
||||
+ mycall,hiscall,hisgrid,lumsg,lcum,nspecial,ndf,
|
||||
+ nstest,dfsh,snrsh,
|
||||
+ NSyncOK,ccf,psavg,ndiag,nwsh)
|
||||
|
4
wsjt65.f
4
wsjt65.f
@ -1,6 +1,6 @@
|
||||
subroutine wsjt65(dat,npts,cfile6,NClearAve,MinSigdB,
|
||||
+ DFTolerance,NFreeze,NAFC,mode65,Nseg,MouseDF,NAgain,
|
||||
+ ndepth,neme,nsked,mycall,hiscall,hisgrid,
|
||||
+ ndepth,neme,nsked,idf,mycall,hiscall,hisgrid,
|
||||
+ lumsg,lcum,nspecial,ndf,nstest,dfsh,
|
||||
+ snrsh,NSyncOK,ccfblue,ccfred,ndiag,nwsh)
|
||||
|
||||
@ -127,7 +127,7 @@ C If we get here, we have achieved sync!
|
||||
c1=decoded(i:i)
|
||||
if(c1.ge.'a' .and. c1.le.'z') decoded(i:i)=char(ichar(c1)-32)
|
||||
enddo
|
||||
write(line,1010) cfile6,nsync,nsnr,dtx-1.0,ndf,
|
||||
write(line,1010) cfile6,nsync,nsnr,dtx-1.0,ndf+idf,
|
||||
+ nint(width),csync,special,decoded(1:19),cooo,kvqual,nqual
|
||||
1010 format(a6,i3,i5,f5.1,i5,i3,1x,a1,1x,a5,a19,1x,a3,i4,i4)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user