Merge branch 'feat-ft2' of bitbucket.org:k1jt/wsjtx into feat-ft2

This commit is contained in:
Steve Franke 2019-02-14 17:37:48 -06:00
commit 473c7058ff
5 changed files with 31 additions and 31 deletions

View File

@ -512,7 +512,6 @@ set (wsjt_FSRCS
lib/mskrtd.f90 lib/mskrtd.f90
lib/ft4/ft4sim.f90 lib/ft4/ft4sim.f90
lib/ft4/ft4sim_mult.f90 lib/ft4/ft4sim_mult.f90
lib/ft4/ft4d.f90
lib/ft4/ft4_decode.f90 lib/ft4/ft4_decode.f90
lib/ft4/ft4_downsample.f90 lib/ft4/ft4_downsample.f90
lib/77bit/my_hash.f90 lib/77bit/my_hash.f90

View File

@ -14,6 +14,7 @@ subroutine clockit(dname,k)
data first/.true./,eps/0.000001/,ntrace/0/ data first/.true./,eps/0.000001/,ntrace/0/
data level/0/,nmax/0/,space/' '/ data level/0/,nmax/0/,space/' '/
data limtrace/0/,lu/29/,ntimer/1/ data limtrace/0/,lu/29/,ntimer/1/
! data limtrace/1000000/,lu/29/,ntimer/1/
save save
if(ntimer.eq.0) return if(ntimer.eq.0) return
@ -56,8 +57,8 @@ subroutine clockit(dname,k)
endif endif
ntrace=ntrace+1 ntrace=ntrace+1
if(ntrace.lt.limtrace) write(lu,1020) ntrace,dname,k,level,nparent(n) if(ntrace.lt.limtrace) write(28,1020) ntrace,dname,k,level,nparent(n)
1020 format(i5,': ',a8,3i5) 1020 format(i8,': ',a8,3i5)
return return
! Write out the timer statistics ! Write out the timer statistics

View File

@ -16,7 +16,7 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, &
character*6 hhmmss character*6 hhmmss
complex cd2(0:NMAX/NDOWN-1) !Complex waveform complex cd2(0:NMAX/NDOWN-1) !Complex waveform
complex cds(0:NMAX/NDOWN-1) !Complex waveform ! complex cds(0:NMAX/NDOWN-1) !Complex waveform
complex cb(0:NMAX/NDOWN-1) complex cb(0:NMAX/NDOWN-1)
complex cd(0:NN*NSS-1) !Complex waveform complex cd(0:NN*NSS-1) !Complex waveform
complex ctwk(4*NSS),ctwk2(4*NSS) complex ctwk(4*NSS),ctwk2(4*NSS)
@ -66,8 +66,8 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, &
1,0,0,1,0,1,1,0,0,0,0,1,0,0,0,1,0,1,0,0,1,1,1,1,0,0,1,0,1, & 1,0,0,1,0,1,1,0,0,0,0,1,0,0,0,1,0,1,0,0,1,1,1,1,0,0,1,0,1, &
0,1,0,1,0,1,1,0,1,1,1,1,1,0,0,0,1,0,1/ 0,1,0,1,0,1,1,0,1,1,1,1,1,0,0,0,1,0,1/
save fs,dt,tt,txt,twopi,h,one,first,nrxx,linex,apbits,nappasses,naptypes, & save fs,dt,tt,txt,twopi,h,one,first,nrxx,linex,apbits,nappasses,naptypes, &
mycall0,hiscall0,ncontest0,msg0 mycall0,hiscall0,msg0
call clockit('ft4_deco',0) call clockit('ft4_deco',0)
hhmmss=cdatetime0(8:13) hhmmss=cdatetime0(8:13)
@ -141,6 +141,8 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, &
nohiscall=.true. nohiscall=.true.
endif endif
message=trim(mycall)//' '//trim(hiscall0)//' RR73' message=trim(mycall)//' '//trim(hiscall0)//' RR73'
i3=-1
n3=-1
call pack77(message,i3,n3,c77) call pack77(message,i3,n3,c77)
call unpack77(c77,1,msgsent,unpk77_success) call unpack77(c77,1,msgsent,unpk77_success)
if(i3.ne.1 .or. (message.ne.msgsent) .or. .not.unpk77_success) go to 10 if(i3.ne.1 .or. (message.ne.msgsent) .or. .not.unpk77_success) go to 10
@ -337,7 +339,6 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, &
apmag=maxval(abs(llra))*1.1 apmag=maxval(abs(llra))*1.1
npasses=3+nappasses(nQSOProgress) npasses=3+nappasses(nQSOProgress)
if(ncontest.ge.5) npasses=3 ! Don't support Fox and Hound if(ncontest.ge.5) npasses=3 ! Don't support Fox and Hound
do ipass=1,npasses do ipass=1,npasses
if(ipass.eq.1) llr=llra if(ipass.eq.1) llr=llra
if(ipass.eq.2) llr=llrb if(ipass.eq.2) llr=llrb
@ -484,7 +485,7 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, &
nrx=-1 nrx=-1
if(index(message,'CQ ').eq.1) nrx=1 if(index(message,'CQ ').eq.1) nrx=1
if((index(message,trim(mycall)//' ').eq.1) .and. & if((index(message,trim(mycall)//' ').eq.1) .and. &
(index(message,' '//trim(hiscall)//' ').ge.4)) then (index(message,' '//trim(hiscall)//' ').ge.4)) then
if(index(message,' 559 ').gt.8) nrx=2 !### Not right ! if(index(message,' 559 ').gt.8) nrx=2 !### Not right !
if(index(message,' R 559 ').gt.8) nrx=3 !### Not right ! if(index(message,' R 559 ').gt.8) nrx=3 !### Not right !
if(index(message,' RR73 ').gt.8) nrx=4 if(index(message,' RR73 ').gt.8) nrx=4

View File

@ -25,7 +25,8 @@ subroutine ft4_downsample(iwave,f0,c)
pi=4.0*atan(1.0) pi=4.0*atan(1.0)
window(0:iwt-1) = 0.5*(1+cos(pi*(/(i,i=iwt-1,0,-1)/)/iwt)) window(0:iwt-1) = 0.5*(1+cos(pi*(/(i,i=iwt-1,0,-1)/)/iwt))
window(iwt:iwt+iwf-1)=1.0 window(iwt:iwt+iwf-1)=1.0
window(iwt+iwf:2*iwt+iwf-1) = 0.5*(1+cos(pi*(/(i,i=0,iwt)/)/iwt)) ! window(iwt+iwf:2*iwt+iwf-1) = 0.5*(1+cos(pi*(/(i,i=0,iwt)/)/iwt))
window(iwt+iwf:2*iwt+iwf-1) = 0.5*(1+cos(pi*(/(i,i=0,iwt-1)/)/iwt))
window(2*iwt+iwf:)=0.0 window(2*iwt+iwf:)=0.0
iws = baud / df iws = baud / df
window=cshift(window,iws) window=cshift(window,iws)

View File

@ -1,22 +1,16 @@
program ft4d program ft4d
include 'ft4_params.f90' include 'ft4_params.f90'
character*8 arg character*8 arg
character*17 cdatetime character*17 cdatetime
character*512 data_dir character*512 data_dir
character*11 datetime
character*37 decodes(100)
character*16 fname
character*12 mycall character*12 mycall
character*12 hiscall character*12 hiscall
character*80 infile character*80 infile
character*61 line character*61 line
real*8 fMHz real*8 fMHz
integer ihdr(11) integer ihdr(11)
integer*2 iwave(NMAX) !Generated full-length waveform integer*2 iwave(180000) !15*12000
fs=12000.0/NDOWN !Sample rate fs=12000.0/NDOWN !Sample rate
dt=1/fs !Sample interval after downsample (s) dt=1/fs !Sample interval after downsample (s)
@ -48,9 +42,10 @@ program ft4d
read(arg,*) nQSOProgress read(arg,*) nQSOProgress
iarg=iarg+2 iarg=iarg+2
endif endif
nfa=200 nfa=0
nfb=3000 nfb=4224
ncontest=0 ncontest=4
ndecodes=0
nfqso=1500 nfqso=1500
mycall="K9AN" mycall="K9AN"
hiscall="K1JT" hiscall="K1JT"
@ -59,20 +54,23 @@ program ft4d
call getarg(ifile,infile) call getarg(ifile,infile)
j2=index(infile,'.wav') j2=index(infile,'.wav')
open(10,file=infile,status='old',access='stream') open(10,file=infile,status='old',access='stream')
read(10,end=999) ihdr,iwave read(10) ihdr
read(infile(j2-4:j2-1),*) nutc npts=ihdr(11)/2
datetime=infile(j2-11:j2-1) read(10) iwave(1:npts)
cdatetime=' '//datetime
close(10) close(10)
cdatetime=infile(1:13)//'.000'
call ft4_decode(cdatetime,0.0,nfa,nfb,nQSOProgress,ncontest,nfqso,iwave, & nsteps=(npts-60000)/3456 + 1
ndecodes,mycall,hiscall,nrx,line,data_dir) do n=1,nsteps
i0=(n-1)*3456 + 1
do idecode=1,ndecodes call ft4_decode(cdatetime,0.0,nfa,nfb,nQSOProgress,ncontest, &
call get_ft4msg(idecode,nrx,line) nfqso,iwave(i0),ndecodes,mycall,hiscall,nrx,line,data_dir)
write(*,'(a61)') line do idecode=1,ndecodes
enddo call get_ft4msg(idecode,nrx,line)
enddo !files write(*,'(a61)') line
enddo
enddo !steps
enddo !files
write(*,1120) write(*,1120)
1120 format("<DecodeFinished>") 1120 format("<DecodeFinished>")