mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-26 22:28:41 -05:00
Quick decode is now done with save algorithms as regular decode.
Working toward on-the-fly computation of symbol spectra. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@429 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
26524d0528
commit
53c2f619f2
@ -1,4 +1,5 @@
|
|||||||
parameter (NSMAX=60*96000) !Samples per 60 s file
|
parameter (NSMAX=60*96000) !Samples per 60 s file
|
||||||
integer*2 id !46 MB: raw data from Linrad timf2
|
integer*2 id !46 MB: raw data from Linrad timf2
|
||||||
character*80 fname80
|
character*80 fname80
|
||||||
common/datcom/nutc,newdat2,id(4,NSMAX,2),kbuf,nlost,nlen,fname80
|
common/datcom/id(4,NSMAX,2),nutc,newdat2,kbuf,kk,kkdone,nlost, &
|
||||||
|
nlen,fname80
|
||||||
|
@ -27,6 +27,9 @@ subroutine decode1(iarg)
|
|||||||
call getfile2(fname80,nlen)
|
call getfile2(fname80,nlen)
|
||||||
newdat=1
|
newdat=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if((kk-kkdone).gt.32768) call symspec(id,kbuf,kk,kkdone,rxnoise)
|
||||||
|
|
||||||
if(ndecoding.gt.0 .and. mode(1:4).eq.'JT65') then
|
if(ndecoding.gt.0 .and. mode(1:4).eq.'JT65') then
|
||||||
ndecdone=0
|
ndecdone=0
|
||||||
call map65a(newdat)
|
call map65a(newdat)
|
||||||
|
@ -4,7 +4,6 @@ subroutine getfile2(fname,len)
|
|||||||
use dflib
|
use dflib
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
parameter (NDMAX=661500) ! =60*11025
|
|
||||||
character*(*) fname
|
character*(*) fname
|
||||||
character infile*15
|
character infile*15
|
||||||
|
|
||||||
@ -50,6 +49,9 @@ subroutine getfile2(fname,len)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
read(filename(8:11),*) nutc
|
read(filename(8:11),*) nutc
|
||||||
|
kbuf=1
|
||||||
|
kk=NSMAX
|
||||||
|
kkdone=0
|
||||||
ndiskdat=1
|
ndiskdat=1
|
||||||
ndecoding=4
|
ndecoding=4
|
||||||
mousebutton=0
|
mousebutton=0
|
||||||
|
1
map65.py
1
map65.py
@ -1084,6 +1084,7 @@ def update():
|
|||||||
avetext.insert(END,lines[0])
|
avetext.insert(END,lines[0])
|
||||||
avetext.insert(END,lines[1])
|
avetext.insert(END,lines[1])
|
||||||
# avetext.configure(state=DISABLED)
|
# avetext.configure(state=DISABLED)
|
||||||
|
cleartext()
|
||||||
Audio.gcom2.ndecdone=0
|
Audio.gcom2.ndecdone=0
|
||||||
|
|
||||||
if Audio.gcom2.ndecdone==2:
|
if Audio.gcom2.ndecdone==2:
|
||||||
|
85
map65a.f90
85
map65a.f90
@ -4,7 +4,6 @@ subroutine map65a(newdat)
|
|||||||
|
|
||||||
parameter (MAXMSG=1000) !Size of decoded message list
|
parameter (MAXMSG=1000) !Size of decoded message list
|
||||||
parameter (NFFT=32768) !Half symbol = 17833 samples;
|
parameter (NFFT=32768) !Half symbol = 17833 samples;
|
||||||
real savg(4,NFFT)
|
|
||||||
real tavg(-50:50) !Temp for finding local base level
|
real tavg(-50:50) !Temp for finding local base level
|
||||||
real base(4) !Local basel level at 4 pol'ns
|
real base(4) !Local basel level at 4 pol'ns
|
||||||
real tmp (200) !Temp storage for pctile sorting
|
real tmp (200) !Temp storage for pctile sorting
|
||||||
@ -18,7 +17,7 @@ subroutine map65a(newdat)
|
|||||||
logical even
|
logical even
|
||||||
character decoded*22,blank*22
|
character decoded*22,blank*22
|
||||||
include 'datcom.f90'
|
include 'datcom.f90'
|
||||||
common/spcom/ip0,ss(4,322,NFFT),ss5(322,NFFT)
|
common/spcom/ip0,ss(4,322,NFFT),ss5(322,NFFT),savg(4,NFFT)
|
||||||
data blank/' '/
|
data blank/' '/
|
||||||
data shmsg0/'ATT','RO ','RRR','73 '/
|
data shmsg0/'ATT','RO ','RRR','73 '/
|
||||||
data nfile/0/,nutc0/-999/,nid/0/,ip000/1/,ip001/1/
|
data nfile/0/,nutc0/-999/,nid/0/,ip000/1/,ip001/1/
|
||||||
@ -40,70 +39,39 @@ subroutine map65a(newdat)
|
|||||||
utcdata=utcdata(1:2)//':'//utcdata(3:4)
|
utcdata=utcdata(1:2)//':'//utcdata(3:4)
|
||||||
open(23,file='CALL3.TXT',status='old')
|
open(23,file='CALL3.TXT',status='old')
|
||||||
|
|
||||||
fselect=mousefqso + 1.6
|
fselect=mousefqso + 1.6 + 0.001*mousedf
|
||||||
df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz
|
df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz
|
||||||
|
ftol=0.020 !Frequency tolerance (kHz)
|
||||||
|
nfilt=1
|
||||||
|
dphi=310/57.2957795
|
||||||
|
|
||||||
|
do nqd=1,0,-1
|
||||||
|
if(nqd.eq.1) then
|
||||||
|
fa=1000.0*(fselect-100.0) - dftolerance
|
||||||
|
fb=1000.0*(fselect-100.0) + dftolerance
|
||||||
|
ia=nint((fa+23000.0)/df + 1.0) ! 23000 = 48000 - 25000
|
||||||
|
ib=nint((fb+23000.0)/df + 1.0)
|
||||||
|
print*,dftolerance,ia,ib
|
||||||
|
else
|
||||||
fa=0.0
|
fa=0.0
|
||||||
fb=60000.0
|
fb=60000.0
|
||||||
ia=nint((fa+23000.0)/df + 1.0) ! 23000 = 48000 - 25000
|
ia=nint((fa+23000.0)/df + 1.0) ! 23000 = 48000 - 25000
|
||||||
ib=nint((fb+23000.0)/df + 1.0)
|
ib=nint((fb+23000.0)/df + 1.0)
|
||||||
ftol=0.020 !Frequency tolerance (kHz)
|
endif
|
||||||
|
|
||||||
kk=0
|
kk=0
|
||||||
nkk=1
|
nkk=1
|
||||||
|
|
||||||
nz=n/8
|
nz=n/8
|
||||||
|
|
||||||
! nfilt=2 should be faster (but doesn't work quite right?)
|
|
||||||
nfilt=1 !nfilt=2 is faster for selected freq
|
|
||||||
dphi=310/57.2957795
|
|
||||||
do kpol=0,3
|
|
||||||
freq=fselect + 0.001*mousedf
|
|
||||||
if(even) ip0=ip000+kpol
|
|
||||||
if(.not.even) ip0=ip001+kpol
|
|
||||||
if(ip0.gt.4) ip0=ip0-4
|
|
||||||
dt00=2.314240
|
|
||||||
dt=dt00
|
|
||||||
call decode1a(id(1,1,kbuf),newdat,nfilt,freq,nflip,dphi,ip0, &
|
|
||||||
sync2,a,dt,pol,nkv,nhist,qual,decoded)
|
|
||||||
nsync1=0
|
|
||||||
nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ###
|
|
||||||
ndf=nint(a(1)) + mousedf
|
|
||||||
nw=0
|
|
||||||
if(nkv.gt.0) go to 5
|
|
||||||
enddo
|
|
||||||
|
|
||||||
5 if(even) ip000=ip0
|
|
||||||
if(.not.even) ip001=ip0
|
|
||||||
|
|
||||||
nkHz=nint(freq-1.600)
|
|
||||||
npol=nint(57.2957795*pol)
|
|
||||||
nqual=qual
|
|
||||||
if(nflip.eq.-1) then !Should this be in decode1a ?
|
|
||||||
do i=22,9,-1
|
|
||||||
if(decoded(i:i).ne.' ') then
|
|
||||||
decoded(i+2:i+4)='OOO'
|
|
||||||
go to 6
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
endif
|
|
||||||
6 write(11,1010) nkHz,ndf,npol,nutc,nsync2,dt,nw,decoded,nkv,nqual
|
|
||||||
1010 format(i3,i5,i4,i5.4,i4,f5.1,i3,2x,a22,2i3)
|
|
||||||
call flushqqq(11)
|
|
||||||
ndecdone=1
|
ndecdone=1
|
||||||
|
|
||||||
if(nagain.eq.1) go to 999
|
|
||||||
! if(newdat.eq.0) go to 999
|
|
||||||
! newdat=0
|
|
||||||
|
|
||||||
nfilt=1
|
|
||||||
do i=1,NFFT
|
do i=1,NFFT
|
||||||
short(1,i)=0.
|
short(1,i)=0.
|
||||||
short(2,i)=0.
|
short(2,i)=0.
|
||||||
short(3,i)=0.
|
short(3,i)=0.
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
call symspec(id(1,1,kbuf),nz,rxnoise,savg)
|
|
||||||
newspec=1
|
newspec=1
|
||||||
|
|
||||||
freq0=-999.
|
freq0=-999.
|
||||||
sync10=-999.
|
sync10=-999.
|
||||||
fshort0=-999.
|
fshort0=-999.
|
||||||
@ -226,8 +194,25 @@ subroutine map65a(newdat)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
if(nqd.eq.1) then
|
||||||
! write(*,1010)
|
nkHz=nint(freq-1.600)
|
||||||
|
npol=nint(57.2957795*pol)
|
||||||
|
nqual=qual
|
||||||
|
if(nflip.eq.-1) then !Should this be in decode1a ?
|
||||||
|
do i=22,9,-1
|
||||||
|
if(decoded(i:i).ne.' ') then
|
||||||
|
decoded(i+2:i+4)='OOO'
|
||||||
|
go to 6
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
|
nw=0
|
||||||
|
6 write(11,1010) nkHz,ndf,npol,nutc,nsync2,dt,nw,decoded,nkv,nqual
|
||||||
|
1010 format(i3,i5,i4,i5.4,i4,f5.1,i3,2x,a22,2i3)
|
||||||
|
call flushqqq(11)
|
||||||
|
endif
|
||||||
|
if(nagain.eq.1) go to 999
|
||||||
|
enddo
|
||||||
|
|
||||||
! Trim the list and produce a sorted index and sizes of groups.
|
! Trim the list and produce a sorted index and sizes of groups.
|
||||||
! (Should trimlist remove all but best SNR for given UTC and message content?)
|
! (Should trimlist remove all but best SNR for given UTC and message content?)
|
||||||
|
2
spec.f90
2
spec.f90
@ -16,7 +16,7 @@ subroutine spec(brightness,contrast,ngain,nspeed,a,a2)
|
|||||||
integer b0,c0
|
integer b0,c0
|
||||||
real s(NFFT,NY)
|
real s(NFFT,NY)
|
||||||
! Could save memory by doing the averaging-by-7 (or 10?) of ss5 in symspec.
|
! Could save memory by doing the averaging-by-7 (or 10?) of ss5 in symspec.
|
||||||
common/spcom/ip0,ss(4,322,NFFT),ss5(322,NFFT)
|
common/spcom/ip0,ss(4,322,NFFT),ss5(322,NFFT),savg(4,NFFT)
|
||||||
include 'gcom1.f90'
|
include 'gcom1.f90'
|
||||||
include 'gcom2.f90'
|
include 'gcom2.f90'
|
||||||
include 'gcom3.f90'
|
include 'gcom3.f90'
|
||||||
|
28
symspec.f
28
symspec.f
@ -1,34 +1,36 @@
|
|||||||
subroutine symspec(id,nz,rxnoise,savg)
|
subroutine symspec(id,kbuf,kk,kkdone,rxnoise)
|
||||||
|
|
||||||
C Compute spectra at four polarizations, using half-symbol steps.
|
C Compute spectra at four polarizations, using half-symbol steps.
|
||||||
|
|
||||||
parameter (NFFT=32768)
|
parameter (NFFT=32768)
|
||||||
parameter (NSMAX=60*96000)
|
parameter (NSMAX=60*96000)
|
||||||
integer*2 id(4,NSMAX)
|
integer*2 id(4,NSMAX)
|
||||||
real savg(4,NFFT)
|
|
||||||
complex cx(NFFT),cy(NFFT) ! pad to 32k with zeros
|
complex cx(NFFT),cy(NFFT) ! pad to 32k with zeros
|
||||||
complex z
|
complex z
|
||||||
real*8 ts,hsym
|
real*8 ts,hsym
|
||||||
common/spcom/ip0,ss(4,322,NFFT),ss5(322,NFFT)
|
common/spcom/ip0,ss(4,322,NFFT),ss5(322,NFFT),savg(4,NFFT)
|
||||||
|
|
||||||
! fac=1.e-4
|
fac=1.e-4
|
||||||
! fac=1.7e-4
|
! fac=1.7e-4
|
||||||
fac=0.0002 * 10.0**(0.05*(-rxnoise))
|
! fac=0.0002 * 10.0**(0.05*(-rxnoise))
|
||||||
|
|
||||||
hsym=2048.d0*96000.d0/11025.d0 !Samples per half symbol
|
hsym=2048.d0*96000.d0/11025.d0 !Samples per half symbol
|
||||||
npts=hsym !Integral samples per half symbol
|
npts=hsym !Integral samples per half symbol
|
||||||
nsteps=322 !Half symbols per transmission
|
ntot=322 !Half symbols per transmission
|
||||||
|
|
||||||
|
if(kkdone.eq.0) then
|
||||||
do ip=1,4
|
do ip=1,4
|
||||||
do i=1,NFFT
|
do i=1,NFFT
|
||||||
savg(ip,i)=0.
|
savg(ip,i)=0.
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
ts=1.d0 - hsym
|
ts=1.d0 - hsym
|
||||||
do n=1,nsteps
|
n=0
|
||||||
ts=ts+hsym !Update exact sample pointer
|
endif
|
||||||
i0=ts !Starting sample pointer
|
|
||||||
|
do nn=1,ntot
|
||||||
|
i0=ts+hsym !Starting sample pointer
|
||||||
|
if((i0+npts-1).gt.kk) go to 999 !See if we have enough points
|
||||||
|
ts=ts+hsym !OK, update the exact sample pointer
|
||||||
do i=1,npts !Copy data to FFT arrays
|
do i=1,npts !Copy data to FFT arrays
|
||||||
xr=fac*id(1,i0+i)
|
xr=fac*id(1,i0+i)
|
||||||
xi=fac*id(2,i0+i)
|
xi=fac*id(2,i0+i)
|
||||||
@ -46,6 +48,7 @@ C Compute spectra at four polarizations, using half-symbol steps.
|
|||||||
call four2a(cx,NFFT,1,1,1) !Do the FFTs
|
call four2a(cx,NFFT,1,1,1) !Do the FFTs
|
||||||
call four2a(cy,NFFT,1,1,1)
|
call four2a(cy,NFFT,1,1,1)
|
||||||
|
|
||||||
|
n=n+1
|
||||||
do i=1,NFFT !Save and accumulate power spectra
|
do i=1,NFFT !Save and accumulate power spectra
|
||||||
sx=real(cx(i))**2 + aimag(cx(i))**2
|
sx=real(cx(i))**2 + aimag(cx(i))**2
|
||||||
ss(1,n,i)=sx ! Pol = 0
|
ss(1,n,i)=sx ! Pol = 0
|
||||||
@ -81,7 +84,8 @@ C Compute spectra at four polarizations, using half-symbol steps.
|
|||||||
ss5(n,i)=0.707*sqrt(q*q + u*u)
|
ss5(n,i)=0.707*sqrt(q*q + u*u)
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
if(n.eq.ntot) go to 999
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
return
|
999 return
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user