From 0e8433d1b0c69919fb666e6dc21479afadefbe6b Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 3 Jun 2019 08:26:32 -0400 Subject: [PATCH 1/6] Several edits to the Release Notes. --- Release_Notes.txt | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/Release_Notes.txt b/Release_Notes.txt index efc7bb42c..101e13d74 100644 --- a/Release_Notes.txt +++ b/Release_Notes.txt @@ -13,30 +13,33 @@ Copyright 2001 - 2019 by Joe Taylor, K1JT. Release: WSJT-X 2.1.0-rc6 - May 30, 2019 + June 2, 2019 ------------------------- - + Changes and bug fixes since WSJT-X 2.1.0-rc5: -IMPORTANT CHANGES TO THE FT4 PROTOCOL, NOT BACKWARD COMPATIBLE +IMPORTANT CHANGES TO THE FT4 PROTOCOL *** NOT BACKWARD COMPATIBLE *** - T/R sequence length increased from 6.0 to 7.5 seconds - - Symbol rate decreased from 23.4375 to 20.8333 baud. - - Bandwidth decreased from 90 Hz to 80 Hz + - Symbol rate decreased from 23.4375 to 20.8333 baud + - Signal bandwidth decreased from 90 Hz to 80 Hz -OTHER IMPROVEMENTS - - Allowable FT4 time offsets -1.0 < DT < +1.0 s - - Allow RRR Tx4 message in FT4 mode, if not using contest messages - - Send FT4 audio frequency to PSK Reporter +OTHER FT4 IMPROVEMENTS + - Allowable time offsets -1.0 < DT < +1.0 s + - Tx4 message with RRR now allowed, except in contest messages + - Audio frequency is now sent to PSK Reporter - Add a third decoding pass - Add ordered statistics decoding - Improved sensitivity: threshold S/N is now -17.5 dB + - Improved S/N calculation + - In FT4 mode, Shift+F11/F12 moves Tx freq by +/- 100 Hz + +OTHER IMPROVEMENTS - Improvements to accessibility - Updates to the User Guide (not yet complete, however) - New user option: "Calling CQ forces Call 1st" - - In FT4 mode, Shift+F11/F12 moves Tx freq by +/- 100 Hz - - Improved S/N calculation for FT4 mode - N1MM Logger+ now uses the standard WSJT-X UDP messages - OK/Cancel buttons on Log QSO window maintain fixed positions + - Put EU VHF contest serial numbers into the ADIF SRX and STX fields BUG FIXES - Fix generation of Tx5 message when one callsign is nonstandard @@ -45,6 +48,13 @@ BUG FIXES - Fix a bug that caused FT4 to do WSPR-style band hopping - Fix a bug that caused a Fortran bounds error +Release candidate WSJT-X 2.1.0-rc6 will be available for beta-testing +through July 21, 2019. It will be inoperable during the ARRL June VHF +QSO Party (June 8-10) or ARRL Field Day (June 22-23). It will +permanently cease to function after July 21, 2019. If all goes +according to plan, by that time there will be a General +Availability (GA) release of WSJT-X 2.1.0. + Release: WSJT-X 2.1.0-rc5 April 29, 2019 From d3121bfedd57038b8a66a33dbd8606a8e909e7f3 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 4 Jun 2019 10:19:35 -0400 Subject: [PATCH 2/6] Correct the open() statement in readwav.f90. --- lib/jt9.f90 | 4 ++-- lib/readwav.f90 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/jt9.f90 b/lib/jt9.f90 index 67e7ac319..0e99a7592 100644 --- a/lib/jt9.f90 +++ b/lib/jt9.f90 @@ -139,7 +139,7 @@ program jt9 read (optarg(:arglen), *) nexp_decode end select end do - + if (display_help .or. stat .lt. 0 & .or. (.not. read_files .and. remain .gt. 0) & .or. (read_files .and. remain .lt. 1)) then @@ -234,7 +234,7 @@ program jt9 read(unit=wav%lun,end=3) shared_data%id2(k-kstep+1:k) go to 4 3 call timer('read_wav',1) - print*,'EOF on input file ',infile + print*,'EOF on input file ',trim(infile) exit 4 call timer('read_wav',1) nhsym=(k-2048)/kstep diff --git a/lib/readwav.f90 b/lib/readwav.f90 index ebc30c9a0..5cd866e68 100644 --- a/lib/readwav.f90 +++ b/lib/readwav.f90 @@ -53,7 +53,7 @@ contains type(riff_descriptor) :: desc character(len=4) :: riff_type - open (newunit=this%lun, file=filename, access='stream', form='unformatted', status='old') + open (unit=this%lun, file=filename, access='stream',status='old') read (unit=this%lun) desc,riff_type inquire (unit=this%lun, pos=filepos) do From 6a2ac44916d73ffaed3a57fb3c8bc7125231bac4 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 4 Jun 2019 10:39:43 -0400 Subject: [PATCH 3/6] Use LU=26 in readwav.f90. --- lib/readwav.f90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/readwav.f90 b/lib/readwav.f90 index 5cd866e68..253690496 100644 --- a/lib/readwav.f90 +++ b/lib/readwav.f90 @@ -53,6 +53,7 @@ contains type(riff_descriptor) :: desc character(len=4) :: riff_type + this%lun=26 open (unit=this%lun, file=filename, access='stream',status='old') read (unit=this%lun) desc,riff_type inquire (unit=this%lun, pos=filepos) @@ -67,5 +68,6 @@ contains end if filepos = filepos + (desc%size + 1) / 2 * 2 ! pad to even alignment end do + return end subroutine read end module readwav From 97be1b46b90c11312905c6e295a68c933eec8ee7 Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Tue, 4 Jun 2019 14:53:45 -0500 Subject: [PATCH 4/6] Add more protection against the i0 crash that has occurred in getcandidates4.f90. --- lib/ft4/ft4_downsample.f90 | 4 ++-- lib/ft4/getcandidates4.f90 | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/ft4/ft4_downsample.f90 b/lib/ft4/ft4_downsample.f90 index ed55fb9a0..f908c6c44 100644 --- a/lib/ft4/ft4_downsample.f90 +++ b/lib/ft4/ft4_downsample.f90 @@ -40,8 +40,8 @@ subroutine ft4_downsample(dd,newdata,f0,c) c1=0. if(i0.ge.0 .and. i0.le.NMAX/2) c1(0)=cx(i0) do i=1,NFFT2/2 - if(i0+i.le.NMAX/2) c1(i)=cx(i0+i) - if(i0-i.ge.0) c1(NFFT2-i)=cx(i0-i) + if(i0+i.ge.0 .and. i0+i.le.NMAX/2) c1(i)=cx(i0+i) + if(i0-i.ge.0 .and. i0-i.le.NMAX/2) c1(NFFT2-i)=cx(i0-i) enddo c1=c1*window/NFFT2 call four2a(c1,NFFT2,1,1,1) !c2c FFT back to time domain diff --git a/lib/ft4/getcandidates4.f90 b/lib/ft4/getcandidates4.f90 index f7cef02ef..951129915 100644 --- a/lib/ft4/getcandidates4.f90 +++ b/lib/ft4/getcandidates4.f90 @@ -47,7 +47,7 @@ subroutine getcandidates4(dd,fa,fb,syncmin,nfqso,maxcand,savg,candidate, & nfa=fa/df if(nfa.lt.nint(200.0/df)) nfa=nint(200.0/df) nfb=fb/df - if(nfb.gt.nint(5000.0/df)) nfb=nint(5000.0/df) + if(nfb.gt.nint(4910.0/df)) nfb=nint(4910.0/df) ncand=0 call ft4_baseline(savg,nfa,nfb,sbase) if(any(sbase(nfa:nfb).le.0)) return @@ -60,13 +60,9 @@ subroutine getcandidates4(dd,fa,fb,syncmin,nfqso,maxcand,savg,candidate, & del=0. if(den.ne.0.0) del=0.5*(savsm(i-1)-savsm(i+1))/den fpeak=(i+del)*df+f_offset - if(fpeak.lt.0.0 .or. fpeak.gt.4910.0) cycle + if(fpeak.lt.200.0 .or. fpeak.gt.4910.0) cycle speak=savsm(i) - 0.25*(savsm(i-1)-savsm(i+1))*del ncand=ncand+1 - if(ncand.gt.maxcand) then - ncand=maxcand - exit - endif candidate(1,ncand)=fpeak candidate(2,ncand)=-99.99 candidate(3,ncand)=speak From f9e9bc01a1bf0d22b04d0c8994c0c61803b6a183 Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Wed, 5 Jun 2019 10:17:59 -0500 Subject: [PATCH 5/6] Update some comments, delete obsolete files. --- lib/ft4/ft4_downsample.f90 | 3 - lib/ft4/ft4_params.f90 | 2 +- lib/ft4/ft4b.f90 | 489 ------------------------------------- lib/ft4/ft4d.f90 | 83 ------- lib/ft4/genft4.f90 | 2 +- 5 files changed, 2 insertions(+), 577 deletions(-) delete mode 100644 lib/ft4/ft4b.f90 delete mode 100644 lib/ft4/ft4d.f90 diff --git a/lib/ft4/ft4_downsample.f90 b/lib/ft4/ft4_downsample.f90 index f908c6c44..bbe53a2a2 100644 --- a/lib/ft4/ft4_downsample.f90 +++ b/lib/ft4/ft4_downsample.f90 @@ -1,8 +1,5 @@ subroutine ft4_downsample(dd,newdata,f0,c) -! Input: real data in dd() at sample rate 12000 Hz -! Output: Complex data in c(), sampled at 1200 Hz - include 'ft4_params.f90' parameter (NFFT2=NMAX/NDOWN) real dd(NMAX) diff --git a/lib/ft4/ft4_params.f90 b/lib/ft4/ft4_params.f90 index 2914260d8..43abc573a 100644 --- a/lib/ft4/ft4_params.f90 +++ b/lib/ft4/ft4_params.f90 @@ -1,5 +1,5 @@ ! FT4 -! LDPC(174,91) code, four 4x4 Costas arrays for Sync +! LDPC(174,91) code, four 4x4 Costas arrays for sync, ramp-up and ramp-down symbols parameter (KK=91) !Information bits (77 + CRC14) parameter (ND=87) !Data symbols diff --git a/lib/ft4/ft4b.f90 b/lib/ft4/ft4b.f90 deleted file mode 100644 index d425277ef..000000000 --- a/lib/ft4/ft4b.f90 +++ /dev/null @@ -1,489 +0,0 @@ -subroutine ft4b(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & - iwave,ndecodes,mycall,hiscall,cqstr,line,data_dir) - - use packjt77 - include 'ft4_params.f90' - parameter (NSS=NSPS/NDOWN) - - character message*37,msgsent*37,msg0*37 - character c77*77 - character*61 line,linex(100) - character*37 decodes(100) - character*512 data_dir,fname - character*17 cdatetime0 - character*12 mycall,hiscall - character*12 mycall0,hiscall0 - character*6 hhmmss - character*4 cqstr,cqstr0 - - complex cd2(0:NMAX/NDOWN-1) !Complex waveform - complex cb(0:NMAX/NDOWN-1) - complex cd(0:NN*NSS-1) !Complex waveform - complex ctwk(2*NSS),ctwk2(2*NSS,-16:16) - complex csymb(NSS) - complex cs(0:3,NN) - real s4(0:3,NN) - - real bmeta(2*NN),bmetb(2*NN),bmetc(2*NN) - real a(5) - real llr(2*ND),llra(2*ND),llrb(2*ND),llrc(2*ND),llrd(2*ND) - real s2(0:255) - real candidate(3,100) - real savg(NH1),sbase(NH1) - - integer apbits(2*ND) - integer apmy_ru(28),aphis_fd(28) - integer icos4a(0:3),icos4b(0:3),icos4c(0:3),icos4d(0:3) - integer*2 iwave(NMAX) !Raw received data - integer*1 message77(77),rvec(77),apmask(2*ND),cw(2*ND) - integer*1 hbits(2*NN) - integer graymap(0:3) - integer ip(1) - integer nappasses(0:5) ! # of decoding passes for QSO States 0-5 - integer naptypes(0:5,4) ! nQSOProgress, decoding pass - integer mcq(29) - integer mrrr(19),m73(19),mrr73(19) - - logical nohiscall,unpk77_success - logical one(0:255,0:7) ! 256 4-symbol sequences, 8 bits - logical first, dobigfft - - data icos4a/0,1,3,2/ - data icos4b/1,0,2,3/ - data icos4c/2,3,1,0/ - data icos4d/3,2,0,1/ - data graymap/0,1,3,2/ - data msg0/' '/ - data first/.true./ - data mcq/0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0/ - data mrrr/0,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,1/ - data m73/0,1,1,1,1,1,1,0,1,0,0,1,0,1,0,0,0,0,1/ - data mrr73/0,1,1,1,1,1,1,0,0,1,1,1,0,1,0,1,0,0,1/ - data rvec/0,1,0,0,1,0,1,0,0,1,0,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,1,1,0, & - 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/ - save fs,dt,tt,txt,twopi,h,one,first,linex,apbits,nappasses,naptypes, & - mycall0,hiscall0,msg0,cqstr0,ctwk2 - - call clockit('ft4_deco',0) - hhmmss=cdatetime0(8:13) - - if(first) then - fs=12000.0/NDOWN !Sample rate after downsampling - dt=1/fs !Sample interval after downsample (s) - tt=NSPS*dt !Duration of "itone" symbols (s) - txt=NZ*dt !Transmission length (s) without ramp up/down - twopi=8.0*atan(1.0) - h=1.0 - one=.false. - do i=0,255 - do j=0,7 - if(iand(i,2**j).ne.0) one(i,j)=.true. - enddo - enddo - - do idf=-16,16 - a=0. - a(1)=real(idf) - ctwk=1. - call clockit('twkfreq1',0) - call twkfreq1(ctwk,2*NSS,fs/2.0,a,ctwk2(:,idf)) - call clockit('twkfreq1',1) - enddo - - mrrr=2*mod(mrrr+rvec(59:77),2)-1 - m73=2*mod(m73+rvec(59:77),2)-1 - mrr73=2*mod(mrr73+rvec(59:77),2)-1 - nappasses(0)=2 - nappasses(1)=2 - nappasses(2)=2 - nappasses(3)=2 - nappasses(4)=2 - nappasses(5)=3 - -! iaptype -!------------------------ -! 1 CQ ??? ??? (29 ap bits) -! 2 MyCall ??? ??? (29 ap bits) -! 3 MyCall DxCall ??? (58 ap bits) -! 4 MyCall DxCall RRR (77 ap bits) -! 5 MyCall DxCall 73 (77 ap bits) -! 6 MyCall DxCall RR73 (77 ap bits) -!******** - naptypes(0,1:4)=(/1,2,0,0/) ! Tx6 selected (CQ) - naptypes(1,1:4)=(/2,3,0,0/) ! Tx1 - naptypes(2,1:4)=(/2,3,0,0/) ! Tx2 - naptypes(3,1:4)=(/3,6,0,0/) ! Tx3 - naptypes(4,1:4)=(/3,6,0,0/) ! Tx4 - naptypes(5,1:4)=(/3,1,2,0/) ! Tx5 - - mycall0='' - hiscall0='' - cqstr0='' - first=.false. - endif - - if(cqstr.ne.cqstr0) then - i0=index(cqstr,' ') - if(i0.le.1) then - message='CQ A1AA AA01' - else - message='CQ '//cqstr(1:i0-1)//' A1AA AA01' - endif - i3=-1 - n3=-1 - call pack77(message,i3,n3,c77) - call unpack77(c77,1,msgsent,unpk77_success) - read(c77,'(29i1)') mcq - mcq=2*mod(mcq+rvec(1:29),2)-1 - cqstr0=cqstr - endif - - l1=index(mycall,char(0)) - if(l1.ne.0) mycall(l1:)=" " - l1=index(hiscall,char(0)) - if(l1.ne.0) hiscall(l1:)=" " - if(mycall.ne.mycall0 .or. hiscall.ne.hiscall0) then - apbits=0 - apbits(1)=99 - apbits(30)=99 - apmy_ru=0 - aphis_fd=0 - - if(len(trim(mycall)) .lt. 3) go to 10 - - nohiscall=.false. - hiscall0=hiscall - if(len(trim(hiscall0)).lt.3) then - hiscall0=mycall ! use mycall for dummy hiscall - mycall won't be hashed. - nohiscall=.true. - endif - message=trim(mycall)//' '//trim(hiscall0)//' RR73' - i3=-1 - n3=-1 - call pack77(message,i3,n3,c77) - call unpack77(c77,1,msgsent,unpk77_success) - if(i3.ne.1 .or. (message.ne.msgsent) .or. .not.unpk77_success) go to 10 - read(c77,'(77i1)') message77 - apmy_ru=2*mod(message77(1:28)+rvec(2:29),2)-1 - aphis_fd=2*mod(message77(30:57)+rvec(29:56),2)-1 - message77=mod(message77+rvec,2) - call encode174_91(message77,cw) - apbits=2*cw-1 - if(nohiscall) apbits(30)=99 - -10 continue - mycall0=mycall - hiscall0=hiscall - endif - candidate=0.0 - ncand=0 - syncmin=1.2 - maxcand=100 - - fa=nfa - fb=nfb - call clockit('getcand4',0) - call getcandidates4(iwave,fa,fb,syncmin,nfqso,maxcand,savg,candidate, & - ncand,sbase) - call clockit('getcand4',1) - - ndecodes=0 - dobigfft=.true. - do icand=1,ncand - f0=candidate(1,icand) - snr=candidate(3,icand)-1.0 - if( f0.le.10.0 .or. f0.ge.4990.0 ) cycle - call clockit('ft4_down',0) - call ft4_downsample(iwave,dobigfft,f0,cd2) !Downsample from 512 to 32 Sa/Symbol - if(dobigfft) dobigfft=.false. - call clockit('ft4_down',1) - - sum2=sum(cd2*conjg(cd2))/(real(NMAX)/real(NDOWN)) - if(sum2.gt.0.0) cd2=cd2/sqrt(sum2) -! Sample rate is now 12000/16 = 750 samples/second - do isync=1,2 - if(isync.eq.1) then - idfmin=-12 - idfmax=12 - idfstp=3 - ibmin=0 - ibmax=216 !Max DT = 216/750 = 0.288 s - ibstp=4 - else - idfmin=idfbest-4 - idfmax=idfbest+4 - idfstp=1 - ibmin=max(0,ibest-5) - ibmax=min(ibest+5,NMAX/NDOWN-1) - ibstp=1 - endif - ibest=-1 - smax=-99. - idfbest=0 - do idf=idfmin,idfmax,idfstp - - call clockit('sync4d ',0) - do istart=ibmin,ibmax,ibstp - call sync4d(cd2,istart,ctwk2(:,idf),1,sync) !Find sync power - if(sync.gt.smax) then - smax=sync - ibest=istart - idfbest=idf - endif - enddo - call clockit('sync4d ',1) - - enddo - enddo - f0=f0+real(idfbest) - if( f0.le.10.0 .or. f0.ge.4990.0 ) cycle - - call clockit('ft4down ',0) - call ft4_downsample(iwave,dobigfft,f0,cb) !Final downsample with corrected f0 - call clockit('ft4down ',1) - sum2=sum(abs(cb)**2)/(real(NSS)*NN) - if(sum2.gt.0.0) cb=cb/sqrt(sum2) - cd=cb(ibest:ibest+NN*NSS-1) - call clockit('four2a ',0) - do k=1,NN - i1=(k-1)*NSS - csymb=cd(i1:i1+NSS-1) - call four2a(csymb,NSS,1,-1,1) - cs(0:3,k)=csymb(1:4) - s4(0:3,k)=abs(csymb(1:4)) - enddo - call clockit('four2a ',1) - -! Sync quality check - is1=0 - is2=0 - is3=0 - is4=0 - do k=1,4 - ip=maxloc(s4(:,k)) - if(icos4a(k-1).eq.(ip(1)-1)) is1=is1+1 - ip=maxloc(s4(:,k+33)) - if(icos4b(k-1).eq.(ip(1)-1)) is2=is2+1 - ip=maxloc(s4(:,k+66)) - if(icos4c(k-1).eq.(ip(1)-1)) is3=is3+1 - ip=maxloc(s4(:,k+99)) - if(icos4d(k-1).eq.(ip(1)-1)) is4=is4+1 - enddo - nsync=is1+is2+is3+is4 !Number of correct hard sync symbols, 0-16 - if(smax .lt. 0.7 .or. nsync .lt. 8) cycle - - do nseq=1,3 !Try coherent sequences of 1, 2, and 4 symbols - if(nseq.eq.1) nsym=1 - if(nseq.eq.2) nsym=2 - if(nseq.eq.3) nsym=4 - nt=2**(2*nsym) - do ks=1,NN-nsym+1,nsym !87+16=103 symbols. - amax=-1.0 - do i=0,nt-1 - i1=i/64 - i2=iand(i,63)/16 - i3=iand(i,15)/4 - i4=iand(i,3) - if(nsym.eq.1) then - s2(i)=abs(cs(graymap(i4),ks)) - elseif(nsym.eq.2) then - s2(i)=abs(cs(graymap(i3),ks)+cs(graymap(i4),ks+1)) - elseif(nsym.eq.4) then - s2(i)=abs(cs(graymap(i1),ks ) + & - cs(graymap(i2),ks+1) + & - cs(graymap(i3),ks+2) + & - cs(graymap(i4),ks+3) & - ) - else - print*,"Error - nsym must be 1, 2, or 4." - endif - enddo - ipt=1+(ks-1)*2 - if(nsym.eq.1) ibmax=1 - if(nsym.eq.2) ibmax=3 - if(nsym.eq.4) ibmax=7 - do ib=0,ibmax - bm=maxval(s2(0:nt-1),one(0:nt-1,ibmax-ib)) - & - maxval(s2(0:nt-1),.not.one(0:nt-1,ibmax-ib)) - if(ipt+ib.gt.2*NN) cycle - if(nsym.eq.1) then - bmeta(ipt+ib)=bm - elseif(nsym.eq.2) then - bmetb(ipt+ib)=bm - elseif(nsym.eq.4) then - bmetc(ipt+ib)=bm - endif - enddo - enddo - enddo - - bmetb(205:206)=bmeta(205:206) - bmetc(201:204)=bmetb(201:204) - bmetc(205:206)=bmeta(205:206) - - call clockit('normaliz',0) - call normalizebmet(bmeta,2*NN) - call normalizebmet(bmetb,2*NN) - call normalizebmet(bmetc,2*NN) - call clockit('normaliz',1) - - hbits=0 - where(bmeta.ge.0) hbits=1 - ns1=count(hbits( 1: 8).eq.(/0,0,0,1,1,0,1,1/)) - ns2=count(hbits( 67: 74).eq.(/0,1,0,0,1,1,1,0/)) - ns3=count(hbits(133:140).eq.(/1,1,1,0,0,1,0,0/)) - ns4=count(hbits(199:206).eq.(/1,0,1,1,0,0,0,1/)) - nsync_qual=ns1+ns2+ns3+ns4 - if(nsync_qual.lt. 20) cycle - - scalefac=2.83 - llra( 1: 58)=bmeta( 9: 66) - llra( 59:116)=bmeta( 75:132) - llra(117:174)=bmeta(141:198) - llra=scalefac*llra - llrb( 1: 58)=bmetb( 9: 66) - llrb( 59:116)=bmetb( 75:132) - llrb(117:174)=bmetb(141:198) - llrb=scalefac*llrb - llrc( 1: 58)=bmetc( 9: 66) - llrc( 59:116)=bmetc( 75:132) - llrc(117:174)=bmetc(141:198) - llrc=scalefac*llrc - - apmag=maxval(abs(llra))*1.1 - npasses=3+nappasses(nQSOProgress) - if(ncontest.ge.5) npasses=3 ! Don't support Fox and Hound - do ipass=1,npasses - if(ipass.eq.1) llr=llra - if(ipass.eq.2) llr=llrb - if(ipass.eq.3) llr=llrc - if(ipass.le.3) then - apmask=0 - iaptype=0 - endif - - if(ipass .gt. 3) then - llrd=llrc - iaptype=naptypes(nQSOProgress,ipass-3) - -! ncontest=0 : NONE -! 1 : NA_VHF -! 2 : EU_VHF -! 3 : FIELD DAY -! 4 : RTTY -! 5 : FOX -! 6 : HOUND -! -! Conditions that cause us to bail out of AP decoding - napwid=50 - if(ncontest.le.4 .and. iaptype.ge.3 .and. (abs(f0-nfqso).gt.napwid) ) cycle - if(iaptype.ge.2 .and. apbits(1).gt.1) cycle ! No, or nonstandard, mycall - if(iaptype.ge.3 .and. apbits(30).gt.1) cycle ! No, or nonstandard, dxcall - - if(iaptype.eq.1) then ! CQ or CQ TEST or CQ FD or CQ RU or CQ SCC - apmask=0 - apmask(1:29)=1 - llrd(1:29)=apmag*mcq(1:29) - endif - - if(iaptype.eq.2) then ! MyCall,???,??? - apmask=0 - if(ncontest.eq.0.or.ncontest.eq.1) then - apmask(1:29)=1 - llrd(1:29)=apmag*apbits(1:29) - else if(ncontest.eq.2) then - apmask(1:28)=1 - llrd(1:28)=apmag*apbits(1:28) - else if(ncontest.eq.3) then - apmask(1:28)=1 - llrd(1:28)=apmag*apbits(1:28) - else if(ncontest.eq.4) then - apmask(2:29)=1 - llrd(2:29)=apmag*apmy_ru(1:28) - endif - endif - - if(iaptype.eq.3) then ! MyCall,DxCall,??? - apmask=0 - if(ncontest.eq.0.or.ncontest.eq.1.or.ncontest.eq.2) then - apmask(1:58)=1 - llrd(1:58)=apmag*apbits(1:58) - else if(ncontest.eq.3) then ! Field Day - apmask(1:56)=1 - llrd(1:28)=apmag*apbits(1:28) - llrd(29:56)=apmag*aphis_fd(1:28) - else if(ncontest.eq.4) then ! RTTY RU - apmask(2:57)=1 - llrd(2:29)=apmag*apmy_ru(1:28) - llrd(30:57)=apmag*apbits(30:57) - endif - endif - - if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then - apmask=0 - if(ncontest.le.4) then - apmask(1:91)=1 ! mycall, hiscall, RRR|73|RR73 - if(iaptype.eq.6) llrd(1:91)=apmag*apbits(1:91) - endif - endif - - llr=llrd - endif - max_iterations=40 - message77=0 - call clockit('bpdecode',0) - call bpdecode174_91(llr,apmask,max_iterations,message77, & - cw,nharderror,niterations) - call clockit('bpdecode',1) - if(sum(message77).eq.0) cycle - if( nharderror.ge.0 ) then - message77=mod(message77+rvec,2) ! remove rvec scrambling - write(c77,'(77i1)') message77(1:77) - call unpack77(c77,1,message,unpk77_success) - idupe=0 - do i=1,ndecodes - if(decodes(i).eq.message) idupe=1 - enddo - if(ibest.le.10 .and. message.eq.msg0) idupe=1 !Already decoded - if(idupe.eq.1) exit - ndecodes=ndecodes+1 - decodes(ndecodes)=message - if(snr.gt.0.0) then - xsnr=10*log10(snr)-14.0 - else - xsnr=-20.0 - endif - nsnr=nint(max(-20.0,xsnr)) - freq=f0 - tsig=mod(tbuf + ibest/750.0,100.0) - - write(line,1000) hhmmss,nsnr,tsig,nint(freq),message -1000 format(a6,i4,f5.1,i5,' + ',1x,a37) - l1=index(data_dir,char(0))-1 - if(l1.ge.1) data_dir(l1+1:l1+1)="/" - fname=data_dir(1:l1+1)//'all_ft4.txt' - open(24,file=trim(fname),status='unknown',position='append') - write(24,1002) cdatetime0,nsnr,tsig,nint(freq),message, & - nharderror,nsync_qual,ipass,niterations,iaptype,nsync - if(hhmmss.eq.' ') write(*,1002) cdatetime0,nsnr, & - tsig,nint(freq),message,nharderror,nsync_qual,ipass, & - niterations,iaptype -1002 format(a17,i4,f5.1,i5,' Rx ',a37,6i4) - close(24) - linex(ndecodes)=line - if(ibest.ge.ibmax-15) msg0=message !Possible dupe candidate - exit - endif - enddo !Sequence estimation - enddo !Candidate list - call clockit('ft4_deco',1) - call clockit2(data_dir) - call clockit('ft4_deco',101) - return - - entry get_ft4msg(idecode,line) - line=linex(idecode) - return - - end subroutine ft4b diff --git a/lib/ft4/ft4d.f90 b/lib/ft4/ft4d.f90 deleted file mode 100644 index a63e3e0a6..000000000 --- a/lib/ft4/ft4d.f90 +++ /dev/null @@ -1,83 +0,0 @@ -program ft4d - - include 'ft4_params.f90' - character*8 arg - character*17 cdatetime - character*512 data_dir - character*12 mycall - character*12 hiscall - character*80 infile - character*61 line - character*4 cqstr - real*8 fMHz - integer ihdr(11) - integer*2 iwave(240000) !20*12000 - - fs=12000.0/NDOWN !Sample rate - dt=1/fs !Sample interval after downsample (s) - tt=NSPS*dt !Duration of "itone" symbols (s) - baud=1.0/tt !Keying rate for "itone" symbols (baud) - txt=NZ*dt !Transmission length (s) - - nargs=iargc() - if(nargs.lt.1) then - print*,'Usage: ft4d [-a ] [-f fMHz] [-n nQSOProgress] file1 [file2 ...]' - go to 999 - endif - iarg=1 - data_dir="." - call getarg(iarg,arg) - if(arg(1:2).eq.'-a') then - call getarg(iarg+1,data_dir) - iarg=iarg+2 - endif - call getarg(iarg,arg) - if(arg(1:2).eq.'-f') then - call getarg(iarg+1,arg) - read(arg,*) fMHz - iarg=iarg+2 - endif - nQSOProgress=0 - if(arg(1:2).eq.'-n') then - call getarg(iarg+1,arg) - read(arg,*) nQSOProgress - iarg=iarg+2 - endif - nfa=10 - nfb=4990 - ndecodes=0 - nfqso=1500 - mycall="K9AN" - hiscall="K1JT" - ncontest=4 - cqstr="RU " - - do ifile=iarg,nargs - call getarg(ifile,infile) - open(10,file=infile,status='old',access='stream') - read(10) ihdr - npts=min(ihdr(11)/2,180000) - read(10) iwave(1:npts) - close(10) - cdatetime=infile - j2=index(infile,'.wav') - if(j2.ge.14) cdatetime=infile(j2-13:j2)//'000' - istep=3456 - nsteps=(npts-52800)/istep + 1 - do n=1,nsteps - i0=(n-1)*istep + 1 - tbuf=(i0-1)/12000.0 - call ft4b(cdatetime,tbuf,nfa,nfb,nQSOProgress,ncontest, & - nfqso,iwave(i0),ndecodes,mycall,hiscall,cqstr,line,data_dir) - do idecode=1,ndecodes - call get_ft4msg(idecode,line) - write(*,'(a61)') line - enddo - enddo !steps - enddo !files - - call four2a(xx,-1,1,-1,1) !Destroy FFTW plans to free their memory - -999 end program ft4d - - diff --git a/lib/ft4/genft4.f90 b/lib/ft4/genft4.f90 index f57ca59aa..66e70a612 100644 --- a/lib/ft4/genft4.f90 +++ b/lib/ft4/genft4.f90 @@ -11,7 +11,7 @@ subroutine genft4(msg0,ichk,msgsent,msgbits,i4tone) ! s16 + 87symbols + 2 ramp up/down = 105 total channel symbols ! r1 + s4 + d29 + s4 + d29 + s4 + d29 + s4 + r1 -! Message duration: TxT = 105*512/12000 = 4.48 s +! Message duration: TxT = 105*576/12000 = 5.04 s ! use iso_c_binding, only: c_loc,c_size_t From 1758e7266be4a327e94572e228284ccb6c7805d0 Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Wed, 5 Jun 2019 10:19:40 -0500 Subject: [PATCH 6/6] Remove deleted files from CMakeLists.txt --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2d6dd396..0bd94174c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -528,7 +528,6 @@ set (wsjt_FSRCS lib/msk144sim.f90 lib/mskrtd.f90 lib/nuttal_window.f90 - lib/ft4/ft4b.f90 lib/ft4/ft4sim.f90 lib/ft4/ft4sim_mult.f90 lib/ft4/ft4_downsample.f90 @@ -1298,9 +1297,6 @@ target_link_libraries (averaged_mf wsjt_fort wsjt_cxx) add_executable (ft4sim_mult lib/ft4/ft4sim_mult.f90 wsjtx.rc) target_link_libraries (ft4sim_mult wsjt_fort wsjt_cxx) -add_executable (ft4d lib/ft4/ft4d.f90 wsjtx.rc) -target_link_libraries (ft4d wsjt_fort wsjt_cxx) - add_executable (record_time_signal Audio/tools/record_time_signal.cpp) target_link_libraries (record_time_signal wsjt_cxx wsjt_qtmm wsjt_qt)