From 44343d87f6ebc5d024e98d4a9a084ccf6a1bb5e2 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 19 Nov 2020 13:45:16 -0500 Subject: [PATCH 01/10] Allow input of fractional SNR to test_q65. --- lib/test_q65.f90 | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/test_q65.f90 b/lib/test_q65.f90 index a6b0e8eaa..5871b0579 100644 --- a/lib/test_q65.f90 +++ b/lib/test_q65.f90 @@ -1,6 +1,6 @@ program test_q65 - character*73 cmd1,cmd2,line + character*75 cmd1,cmd2,line character*22 msg character*8 arg character*1 csubmode @@ -34,7 +34,7 @@ program test_q65 call getarg(9,arg) read(arg,*) nfiles call getarg(10,arg) - read(arg,*) nsnr + read(arg,*) snr if(ntrperiod.eq.15) then nsps=1800 @@ -56,17 +56,17 @@ program test_q65 endif ia=i50 + 8 ib=i50 - 5 - if(nsnr.ne.0) then - ia=nsnr - ib=nsnr + if(snr.ne.0.0) then + ia=99 + ib=99 endif baud=12000.0/nsps tsym=1.0/baud ! 1 2 3 4 5 6 7 -! 1234567890123456789012345678901234567890123456789012345678901234567890123' - cmd1='q65sim "K1ABC W9XYZ EN37 " A 1500 5.0 0.0 60 100 F -10 > junk0' +! 123456789012345678901234567890123456789012345678901234567890123456789012345' + cmd1='q65sim "K1ABC W9XYZ EN37 " A 1500 5.0 0.0 60 100 F -10.0 > junk0' cmd2='jt9 -3 -p 15 -L 300 -H 3000 -d 3 -b A -Q 3 *.wav > junk' write(cmd1(10:33),'(a)') '"'//msg//'"' @@ -91,19 +91,21 @@ program test_q65 write(*,1010) (j,j=0,6) write(12,1010) (j,j=0,6) -1010 format('SNR d Dop Sync DecN Dec1 Bad',i6,6i4,' tdec'/66('-')) +1010 format(' SNR d Dop Sync DecN Dec1 Bad',i6,6i4,' tdec'/68('-')) dterr=tsym/4.0 nferr=max(1,nint(0.5*baud),nint(fdop/3.0)) ndec10=nfiles do nsnr=ia,ib,-1 + snr1=nsnr + if(ia.eq.99) snr1=snr nsync=0 ndec1=0 nfalse=0 naptype=0 ndecn=0 - write(cmd1(63:65),'(i3)') nsnr + write(cmd1(63:67),'(f5.1)') snr1 call system(cmd1) call sec0(0,tdec) call system(cmd2) @@ -136,13 +138,13 @@ program test_q65 10 close(10) xdt_avg=0. xdt_rms=0. - write(*,1100) nsnr,ndepth,fDop,nsync,ndecn,ndec1,nfalse,naptype, & + write(*,1100) snr1,ndepth,fDop,nsync,ndecn,ndec1,nfalse,naptype, & tdec/nfiles - write(12,1100) nsnr,ndepth,fDop,nsync,ndecn,ndec1,nfalse,naptype, & + write(12,1100) snr1,ndepth,fDop,nsync,ndecn,ndec1,nfalse,naptype, & tdec/nfiles -1100 format(i3,i3,f5.1,3i5,i4,i6,6i4,f6.2) +1100 format(f5.1,i3,f5.1,3i5,i4,i6,6i4,f6.2) if(ndec1.lt.nfiles/2 .and. ndec10.ge.nfiles/2) then - snr_thresh=nsnr + float(nfiles/2 - ndec1)/(ndec10-ndec1) + snr_thresh=snr1 + float(nfiles/2 - ndec1)/(ndec10-ndec1) write(13,1200) ndepth,fdop,csubmode,snr_thresh 1200 format(i3,f6.1,2x,a1,f7.1) flush(13) From 0bcb2f0d11df7e3eb4cd7135823bc43a512c6577 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 19 Nov 2020 13:50:59 -0500 Subject: [PATCH 02/10] Adjust SNR limits in test_q65. --- lib/test_q65.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/test_q65.f90 b/lib/test_q65.f90 index 5871b0579..395e5a5d2 100644 --- a/lib/test_q65.f90 +++ b/lib/test_q65.f90 @@ -54,8 +54,8 @@ program test_q65 else stop 'Invalid TR period' endif - ia=i50 + 8 - ib=i50 - 5 + ia=i50 + 5 + ib=i50 - 10 if(snr.ne.0.0) then ia=99 ib=99 From 13d0b20661895f90131e94172997078c25aa127e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 19 Nov 2020 15:25:28 -0500 Subject: [PATCH 03/10] Change the unmasked bits for iaptype 4, 5, 6. Tweak the SNR limits in test_q65. --- lib/qra/q65/q65_ap.f90 | 5 +++-- lib/test_q65.f90 | 10 ++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/qra/q65/q65_ap.f90 b/lib/qra/q65/q65_ap.f90 index f0cfd72a2..c30314b1a 100644 --- a/lib/qra/q65/q65_ap.f90 +++ b/lib/qra/q65/q65_ap.f90 @@ -146,11 +146,12 @@ subroutine q65_ap(nQSOprogress,ipass,ncontest,lapcqonly,iaptype, & if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then apmask=0 if(ncontest.le.5 .or. (ncontest.eq.7.and.iaptype.eq.6)) then - apmask(1:78)=1 ! mycall, hiscall, RRR|73|RR73 + apmask(1:78)=1 !MyCall, HisCall, RRR|73|RR73 + apmask(59:63)=0 !Reduce the rate of false decodes apsymbols(1:58)=apsym0 if(iaptype.eq.4) apsymbols(59:77)=mrrr if(iaptype.eq.5) apsymbols(59:77)=m73 - if(iaptype.eq.6) apsymbols(59:77)=mrr73 + if(iaptype.eq.6) apsymbols(59:77)=mrr73 else if(ncontest.eq.7.and.iaptype.eq.4) then ! Hound listens for MyCall RR73;... apmask(1:28)=1 apsymbols(1:28)=apsym0(1:28) diff --git a/lib/test_q65.f90 b/lib/test_q65.f90 index 395e5a5d2..66caca99a 100644 --- a/lib/test_q65.f90 +++ b/lib/test_q65.f90 @@ -54,7 +54,7 @@ program test_q65 else stop 'Invalid TR period' endif - ia=i50 + 5 + ia=i50 + 7 ib=i50 - 10 if(snr.ne.0.0) then ia=99 @@ -145,9 +145,11 @@ program test_q65 1100 format(f5.1,i3,f5.1,3i5,i4,i6,6i4,f6.2) if(ndec1.lt.nfiles/2 .and. ndec10.ge.nfiles/2) then snr_thresh=snr1 + float(nfiles/2 - ndec1)/(ndec10-ndec1) - write(13,1200) ndepth,fdop,csubmode,snr_thresh -1200 format(i3,f6.1,2x,a1,f7.1) - flush(13) + open(13,file='snr_thresh.out',status='unknown',position='append') + write(13,1200) ntrperiod,csubmode,ndepth,nQSOprogress,nfiles, & + fdop,snr_thresh,trim(msg) +1200 format(i3,a1,2i3,i5,2f7.1,2x,a) + close(13) endif flush(6) flush(12) From 3662a76de7ca70db55240562da1eda5729ce5488 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 19 Nov 2020 15:41:15 -0500 Subject: [PATCH 04/10] More Q65 test program tweaks. --- lib/qra/q65/q65_ap.f90 | 2 +- lib/test_q65.f90 | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/qra/q65/q65_ap.f90 b/lib/qra/q65/q65_ap.f90 index c30314b1a..b335153c3 100644 --- a/lib/qra/q65/q65_ap.f90 +++ b/lib/qra/q65/q65_ap.f90 @@ -147,7 +147,7 @@ subroutine q65_ap(nQSOprogress,ipass,ncontest,lapcqonly,iaptype, & apmask=0 if(ncontest.le.5 .or. (ncontest.eq.7.and.iaptype.eq.6)) then apmask(1:78)=1 !MyCall, HisCall, RRR|73|RR73 - apmask(59:63)=0 !Reduce the rate of false decodes + apmask(59:66)=0 !Reduce the rate of false decodes apsymbols(1:58)=apsym0 if(iaptype.eq.4) apsymbols(59:77)=mrrr if(iaptype.eq.5) apsymbols(59:77)=m73 diff --git a/lib/test_q65.f90 b/lib/test_q65.f90 index 66caca99a..4aa452458 100644 --- a/lib/test_q65.f90 +++ b/lib/test_q65.f90 @@ -91,7 +91,7 @@ program test_q65 write(*,1010) (j,j=0,6) write(12,1010) (j,j=0,6) -1010 format(' SNR d Dop Sync DecN Dec1 Bad',i6,6i4,' tdec'/68('-')) +1010 format(' SNR Mode d Dop Sync DecN Dec1 Bad',i6,6i4,' tdec'/73('-')) dterr=tsym/4.0 nferr=max(1,nint(0.5*baud),nint(fdop/3.0)) @@ -138,11 +138,11 @@ program test_q65 10 close(10) xdt_avg=0. xdt_rms=0. - write(*,1100) snr1,ndepth,fDop,nsync,ndecn,ndec1,nfalse,naptype, & - tdec/nfiles - write(12,1100) snr1,ndepth,fDop,nsync,ndecn,ndec1,nfalse,naptype, & - tdec/nfiles -1100 format(f5.1,i3,f5.1,3i5,i4,i6,6i4,f6.2) + write(*,1100) snr1,ntrperiod,csubmode,ndepth,fDop,nsync,ndecn, & + ndec1,nfalse,naptype,tdec/nfiles + write(12,1100) snr1,ntrperiod,csubmode,ndepth,fDop,nsync,ndecn, & + ndec1,nfalse,naptype,tdec/nfiles +1100 format(f5.1,i4,a1,i3,f5.1,3i5,i4,i6,6i4,f6.2) if(ndec1.lt.nfiles/2 .and. ndec10.ge.nfiles/2) then snr_thresh=snr1 + float(nfiles/2 - ndec1)/(ndec10-ndec1) open(13,file='snr_thresh.out',status='unknown',position='append') From 09815826e2358b4a8f5843b9717f377622b9a971 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 20 Nov 2020 15:16:23 -0500 Subject: [PATCH 05/10] For Q65 with QSOprogress=3, reduce npasses to 2 (iaptype=3, 4 only); reduce APmast from 78 to 75 bits. --- lib/q65_decode.f90 | 1 - lib/qra/q65/q65_ap.f90 | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index 9f49868ca..347621026 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -120,7 +120,6 @@ contains where(apsym0.eq.-1) apsym0=0 npasses=2 - if(nQSOprogress.eq.3 .or.nQSOprogress.eq.4) npasses=4 if(nQSOprogress.eq.5) npasses=3 if(lapcqonly) npasses=1 iaptype=0 diff --git a/lib/qra/q65/q65_ap.f90 b/lib/qra/q65/q65_ap.f90 index b335153c3..6c56cd2f5 100644 --- a/lib/qra/q65/q65_ap.f90 +++ b/lib/qra/q65/q65_ap.f90 @@ -147,7 +147,7 @@ subroutine q65_ap(nQSOprogress,ipass,ncontest,lapcqonly,iaptype, & apmask=0 if(ncontest.le.5 .or. (ncontest.eq.7.and.iaptype.eq.6)) then apmask(1:78)=1 !MyCall, HisCall, RRR|73|RR73 - apmask(59:66)=0 !Reduce the rate of false decodes + apmask(72:74)=0 !Check for , RRR, RR73, 73 apsymbols(1:58)=apsym0 if(iaptype.eq.4) apsymbols(59:77)=mrrr if(iaptype.eq.5) apsymbols(59:77)=m73 From 7ff3d598c80af84011212ac9feb79e1b146f5a5e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 20 Nov 2020 15:40:25 -0500 Subject: [PATCH 06/10] Use g15 = 32403 rather than 32373 for the "RR73" message fragment in Q65. --- lib/qra/q65/genq65.f90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/qra/q65/genq65.f90 b/lib/qra/q65/genq65.f90 index 300cbf070..4c555748a 100644 --- a/lib/qra/q65/genq65.f90 +++ b/lib/qra/q65/genq65.f90 @@ -26,6 +26,8 @@ subroutine genq65(msg0,ichk,msgsent,itone,i3,n3) i3=-1 n3=-1 call pack77(msg0,i3,n3,c77) + read(c77(60:74),'(b15)') ng15 + if(ng15.eq.32373) c77(60:74)='111111010010011' !Message is RR73 call unpack77(c77,0,msgsent,unpk77_success) !Unpack to get msgsent read(c77,1001) dgen 1001 format(12b6.6,b5.5) From d9cb87054057d3fcc7b6761134c5bf7b5a177aa6 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 20 Nov 2020 17:07:11 -0500 Subject: [PATCH 07/10] Adjust Q65 jitter-loop ranges according to ndepth. --- lib/qra/q65/q65_loops.f90 | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/qra/q65/q65_loops.f90 b/lib/qra/q65/q65_loops.f90 index a3d62e765..8ca0b322c 100644 --- a/lib/qra/q65/q65_loops.f90 +++ b/lib/qra/q65/q65_loops.f90 @@ -25,16 +25,20 @@ subroutine q65_loops(c00,nutc,npts2,nsps,mode,mode64,nsubmode,nFadingModel, & allocate(c0(0:npts2-1)) irc=-99 s3lim=20. -! ibwmax=11 -! if(mode64.le.4) ibwmax=9 -! ibwmin=ibwmax -! idtmax=3 -! call qra_params(ndepth,maxaptype,idfmax,idtmax,ibwmin,ibwmax,maxdist) - idfmax=5 - idtmax=5 + + idfmax=3 + idtmax=3 ibwmin=1 ibwmax=2 maxdist=15 + if(ndepth.ge.2) then + idfmax=5 + idtmax=5 + maxdist=25 + endif + if(ndepth.eq.3) then + ibwmax=5 + endif LL=64*(mode64+2) NN=63 napmin=99 From 6da4be174c49d4b7344d3ec6e9de5e28f42a2598 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 21 Nov 2020 09:39:37 -0500 Subject: [PATCH 08/10] We now have only 4 levels of AP decoding. Modify test_q65 accordingly. --- lib/test_q65.f90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/test_q65.f90 b/lib/test_q65.f90 index 4aa452458..0c71d64a5 100644 --- a/lib/test_q65.f90 +++ b/lib/test_q65.f90 @@ -4,7 +4,7 @@ program test_q65 character*22 msg character*8 arg character*1 csubmode - integer naptype(0:6) + integer naptype(0:4) logical decok nargs=iargc() @@ -89,9 +89,9 @@ program test_q65 !1000 format(/'Depth:',i2,' AP:',i2,' df:',i3,' dt:',i3,' bw1:',i3,' bw2:',i3, & ! ' dist:',i3) - write(*,1010) (j,j=0,6) - write(12,1010) (j,j=0,6) -1010 format(' SNR Mode d Dop Sync DecN Dec1 Bad',i6,6i4,' tdec'/73('-')) + write(*,1010) (j,j=0,4) + write(12,1010) (j,j=0,4) +1010 format(' SNR Mode d Dop Sync DecN Dec1 Bad',5i5,' tdec'/70('-')) dterr=tsym/4.0 nferr=max(1,nint(0.5*baud),nint(fdop/3.0)) @@ -142,7 +142,7 @@ program test_q65 ndec1,nfalse,naptype,tdec/nfiles write(12,1100) snr1,ntrperiod,csubmode,ndepth,fDop,nsync,ndecn, & ndec1,nfalse,naptype,tdec/nfiles -1100 format(f5.1,i4,a1,i3,f5.1,3i5,i4,i6,6i4,f6.2) +1100 format(f5.1,i4,1x,a1,i3,f5.1,3i5,i4,i6,4i5,f6.2) if(ndec1.lt.nfiles/2 .and. ndec10.ge.nfiles/2) then snr_thresh=snr1 + float(nfiles/2 - ndec1)/(ndec10-ndec1) open(13,file='snr_thresh.out',status='unknown',position='append') From 8e4ed9b3bea6abc12465c138c39c28e36c4268b2 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 21 Nov 2020 10:12:46 -0500 Subject: [PATCH 09/10] Fix a bug in jt65_decode: crash when Rx Freq is set too close to upper freq limit on waterfall. --- lib/jt65_decode.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/jt65_decode.f90 b/lib/jt65_decode.f90 index 5242b6efe..bfb78b254 100644 --- a/lib/jt65_decode.f90 +++ b/lib/jt65_decode.f90 @@ -179,6 +179,7 @@ contains ia=max(1,nint((nfa-100)/df)) ib=min(NSZ,nint((nfb+100)/df)) nz=ib-ia+1 + if(nz.lt.50) go to 900 call lorentzian(savg(ia),nz,a) baseline=a(1) amp=a(2) From b2833fd6f08cf29b167e049d8518f92754b008b3 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 21 Nov 2020 11:34:17 -0500 Subject: [PATCH 10/10] Fix the use of ndepth for setting jitter-loop limits. --- lib/qra/q65/q65_loops.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/qra/q65/q65_loops.f90 b/lib/qra/q65/q65_loops.f90 index 8ca0b322c..1e1576556 100644 --- a/lib/qra/q65/q65_loops.f90 +++ b/lib/qra/q65/q65_loops.f90 @@ -30,13 +30,13 @@ subroutine q65_loops(c00,nutc,npts2,nsps,mode,mode64,nsubmode,nFadingModel, & idtmax=3 ibwmin=1 ibwmax=2 - maxdist=15 - if(ndepth.ge.2) then + maxdist=5 + if(iand(ndepth,3).ge.2) then idfmax=5 idtmax=5 - maxdist=25 + maxdist=15 endif - if(ndepth.eq.3) then + if(iand(ndepth,3).eq.3) then ibwmax=5 endif LL=64*(mode64+2)