diff --git a/UnitTests.txt b/UnitTests.txt index d424738c6..aa07f459f 100644 --- a/UnitTests.txt +++ b/UnitTests.txt @@ -5,33 +5,27 @@ RxFreq: 1000/10 Commit No_AP MyCall BothCalls ----------------------------------------------- -ef4787: 3 10 6 14 30 33 -ef4787: 1 3 8 85 -ef4787: 3 3 8* 286 -ada5a6: 3 6 6 10 29 36 -10f574: 2 7 97.6 6 10 95.4 21 33 80.7 -b8ea4c: 2 7 100.5 6 10 96.9 21 33 81.0 -a6779e: 3 1 6 95.2 6 11 90.1 21 33 67.3 -767f53: 1 1 5 116 6 10 85 21 32 59 -767f53: 2 2 7 301 6 10 241 21 33 168 -767f53: 3 2 7 334 6 10 283 21 33 194 -0765a1: 1 1 5 61 6 10 56 21 33 39 -0765a1: 2 2 7 205 6 12 183 21 34 126 -0765a1: 3 2 7 234 6 12 209 21 34 152 +767f53: 1 1 5 116 6 10 85 21 32 59 RC1 +767f53: 2 2 7 301 6 10 241 21 33 168 +767f53: 3 2 7 334 6 10 283 21 33 194 +94c315: 1 1 5 61 6 10 56 21 33 39 +94c315: 2 2 7 205 6 12 183 21 34 126 +94c315: 3 2 7 234 6 12 209 21 34 152 Mode: Q65-30A Data: 30A_N0AN_6m_Ionoscatter (69 files, 6m ionoscatter) Message: "N0AN K1JT -19" RxFreq: 1500/10 -Commit No_AP MyCall BothCalls ------------------------------------------------- -ef4787: 7 14 16 22 38 40 -70a348: 38 43 -ada5a6: 10 17 11 23 40 46 -10f574: 8 16 99.4 15 24 91.8 34 44 68.8 -b8ea4c: 8 16 96.0 15 23 92.4 34 44 68.8 -a6779e: 3 9 17 87.1 15 22 84.4 33 42 55.3 +Commit No_AP MyCall BothCalls +----------------------------------------------- +767f53: 1 8 16 76 15 23 70 33 42 48 +767f53: 2 10 16 225 15 24 217 34 44 134 +767f53: 3 10 16 266 15 24 260 34 44 155 +94c315: 1 8 16 45 16 23 43 33 42 32 +94c315: 2 11 17 163 16 23 159 34 44 101 +94c315: 3 11 17 241 16 23 184 34 44 117 + Mode: Q65-60B Data: 60B_1296_Troposcatter (75 files) @@ -40,11 +34,13 @@ RxFreq: 1000/10 Commit No_AP MyCall BothCalls -------------------------------------------------- -ef4787: 1 2 11 23 64 67 -ada5a6: 1 5 14 28 64 67 -10f574: 1 5 142.7 11 27 129.8 65 67 36.8 -b8ea4c: 1 5 144.3 11 27 132.2 65 67 39.3 -a6779e: 3 1 9 129.8 12 24 120.3 68 69 24.4 +767f53: 1 1 5 115 12 27 105 68 69 22 RC1 +767f53: 2 1 5 322 12 28 304 65 67 53 +767f53: 3 1 5 401 12 28 354 65 67 63 +94c315: 1 1 8 81 12 26 71 68 69 19 +94c315: 2 1 8 249 14 28 235 68 69 36 +94c315: 3 1 8 283 14 28 270 68 69 39 + Mode: Q65-60D Data: MsgAvg (22 files, simulated fDop = 50 Hz) @@ -53,11 +49,12 @@ RxFreq: 1000/10 Commit No_AP MyCall BothCalls ------------------------------------------------ -ef4787: 0 10 21 21 22 22 -ada5a6 0 11 21 21 22 22 -10f574: 0 11 47.7 21 21 33.9 22 22 11.6 -b8ea4c: 0 11 46.4 21 21 33.8 22 22 11.9 -a6779e: 3 0 11 42.3 19 19 32.9 22 22 8.4 +767f53: 1 0 11 39 19 19 28 22 22 7 +767f53: 2 0 11 103 21 21 70 22 22 7 +767f53: 3 0 11 106 21 21 73 22 22 7 +94c315: 1 0 11 27 19 19 20 22 22 7 +94c315: 2 0 11 83 21 21 57 22 22 7 +94c315: 3 0 11 92 21 21 64 22 22 7 Mode: Q65-60D Data: 60D_2 (21 files, 1296 troposcatter) @@ -66,20 +63,26 @@ RxFreq: 1000/20 Commit No_AP MyCall BothCalls ---------------------------------------------- -10f574: 5 5 33.6 7 8 31.8 12 14 25.1 -b8ea4v: 5 5 39.1 7 8 38.0 13 14 30.8 -a6779e: 3 2 4 40.5 6 8 40.9 13 14 25.1 +767f53: 1 2 4 36 6 8 35 13 14 22 +767f53: 2 5 5 84 9 10 78 13 14 47 +767f53: 3 5 5 85 9 10 83 13 14 50 +94c315: 1 2 4 27 6 8 25 13 15 17 +94c315: 2 5 5 67 7 8 65 13 15 39 +94c315: 3 5 5 76 9 10 71 13 15 44 Mode: Q65-120D Data: 120D (14 files, 10 GHz troposcatter) -Message: "VK7MO VK3WE QF32" +Message: "VK7MO VK3WE QF32", "VK7MO VK3WE R-18" RxFreq: 1000/20 Commit No_AP MyCall BothCalls ---------------------------------------------- -10f574: 0 0 24.9 0 0 25.0 1 4 25.0 -b8ea4v: 0 0 39.1 0 0 25.4 1 5 40.1 -a6779e: 3 0 0 39.1 0 0 39.0 1 5 38.9 +767f53: 1 0 0 33 0 0 34 1 5 31 RC1 +767f53: 2 0 0 83 0 0 80 1 5 74 +767f53: 3 0 0 89 0 0 89 1 5 83 +94c315: 1 0 0 26 0 0 26 1 5 25 +94c315: 2 0 0 66 0 0 66 1 5 61 +94c315: 3 0 0 72 0 0 72 1 5 67 Mode: Q65-60D Data: 60D_10_GHz_EME (14 files) @@ -88,6 +91,9 @@ RxFreq: 1000/50 Commit No_AP MyCall BothCalls ---------------------------------------------- -10f574: 9 10 13.6 10 11 12.7 14 14 7.1 -b8ea4v: 9 10 13.7 10 11 12.6 14 14 7.5 -a6779e: 3 8 9 15.3 9 10 14.6 14 14 7.9 +767f53: 1 8 9 13 9 10 12 14 14 6 RC1 +767f53: 2 9 10 26 10 11 25 14 14 6 +767f53: 3 9 10 27 10 11 26 14 14 6 +94c315: 1 8 9 11 9 10 10 14 14 6 +94c315: 2 9 10 22 10 11 20 14 14 6 +94c315: 3 9 10 24 10 11 23 14 14 6 diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index 8140036f7..86a00aa16 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -70,7 +70,7 @@ contains logical single_decode,lagain complex, allocatable :: c00(:) !Analytic signal, 6000 Sa/s complex, allocatable :: c0(:) !Analytic signal, 6000 Sa/s - + ! Start by setting some parameters and allocating storage for large arrays call sec0(0,tdecode) nfa=nfa0 @@ -112,13 +112,12 @@ contains baud=12000.0/nsps this%callback => callback nFadingModel=1 - maxiters=50 + maxiters=67 ibwa=max(1,int(1.8*log(baud*mode_q65)) + 1) - ibwb=min(10,ibwa+3) + ibwb=min(10,ibwa+4) if(iand(ndepth,3).ge.2) then ibwa=max(1,int(1.8*log(baud*mode_q65)) + 1) ibwb=min(10,ibwa+5) - maxiters=75 else if(iand(ndepth,3).eq.3) then ibwa=max(1,ibwa-1) ibwb=min(10,ibwb+1) @@ -228,7 +227,7 @@ contains write(c77,1000) dat4(1:12),dat4(13)/2 1000 format(12b6.6,b5.5) call unpack77(c77,0,decoded,unpk77_success) !Unpack to get msgsent - call q65_snr(dat4,dtdec,f0dec,mode_q65,snr2) + call q65_snr(dat4,dtdec,f0dec,mode_q65,nused,snr2) nsnr=nint(snr2) call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded, & idec,nused,ntrperiod) @@ -248,8 +247,8 @@ contains '1x,a6,1x,a6,1x,a4,1x,a)' if(ntrperiod.le.30) fmt(5:5)='6' if(idec.eq.3) nrc=0 - write(22,fmt) nutc,cmode,nQSOprogress,idec,idf,idt,ibw,ndist, & - nused,icand,ncand,nrc,ndepth,xdt,f0,snr2,tdecode, & + write(22,fmt) nutc,cmode,nQSOprogress,idec,idfbest,idtbest,ibw, & + ndistbest,nused,icand,ncand,nrc,ndepth,xdt,f0,snr2,tdecode, & mycall(1:6),c6,c4,trim(decoded) close(22) endif @@ -310,7 +309,7 @@ contains ! Unpack decoded message for display to user write(c77,1000) dat4(1:12),dat4(13)/2 call unpack77(c77,0,decoded,unpk77_success) !Unpack to get msgsent - call q65_snr(dat4,dtdec,f0dec,mode_q65,snr2) + call q65_snr(dat4,dtdec,f0dec,mode_q65,nused,snr2) nsnr=nint(snr2) call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded, & idec,nused,ntrperiod) @@ -330,8 +329,8 @@ contains '1x,a6,1x,a6,1x,a4,1x,a)' if(ntrperiod.le.30) fmt(5:5)='6' if(idec.eq.3) nrc=0 - write(22,fmt) nutc,cmode,nQSOprogress,idec,idf,idt,ibw,ndist, & - nused,icand,ncand,nrc,ndepth,xdt,f0,snr2,tdecode, & + write(22,fmt) nutc,cmode,nQSOprogress,idec,idfbest,idtbest,ibw, & + ndistbest,nused,icand,ncand,nrc,ndepth,xdt,f0,snr2,tdecode, & mycall(1:6),c6,c4,trim(decoded) close(22) endif diff --git a/lib/qra/q65/q65.f90 b/lib/qra/q65/q65.f90 index e79f48d83..30138781b 100644 --- a/lib/qra/q65/q65.f90 +++ b/lib/qra/q65/q65.f90 @@ -11,7 +11,7 @@ module q65 38,46,50,55,60,62,66,69,74,76,85/) integer codewords(63,206) integer ibwa,ibwb,ncw,nsps,mode_q65,nfa,nfb - integer idf,idt,ibw,ndist,maxiters + integer idfbest,idtbest,ibw,ndistbest,maxiters integer istep,nsmo,lag1,lag2,npasses,nused,iseq,ncand,nrc integer i0,j0 integer navg(0:1) @@ -626,7 +626,7 @@ subroutine q65_bzap(s3,LL) return end subroutine q65_bzap -subroutine q65_snr(dat4,dtdec,f0dec,mode_q65,snr2) +subroutine q65_snr(dat4,dtdec,f0dec,mode_q65,nused,snr2) ! Estimate SNR of a decoded transmission by aligning the spectra of ! all 85 symbols. @@ -674,6 +674,9 @@ subroutine q65_snr(dat4,dtdec,f0dec,mode_q65,snr2) sig_area=sum(spec(ia+nsum:ib-nsum)-1.0) w_equiv=sig_area/(smax-1.0) snr2=db(max(1.0,sig_area)) - db(2500.0/df) + if(nused.eq.2) snr2=snr2 - 2.0 + if(nused.eq.3) snr2=snr2 - 2.9 + if(nused.ge.4) snr2=snr2 - 3.5 ! do i=ia,ib ! write(71,3071) i*df,spec(i),db(spec(i)) diff --git a/lib/qra/q65/q65_loops.f90 b/lib/qra/q65/q65_loops.f90 index 6d9e24122..827e7f4c5 100644 --- a/lib/qra/q65/q65_loops.f90 +++ b/lib/qra/q65/q65_loops.f90 @@ -38,6 +38,9 @@ subroutine q65_loops(c00,npts2,nsps2,nsubmode,ndepth,jpk0, & napmin=99 xdt1=xdt0 f1=f0 + idfbest=0 + idtbest=0 + ndistbest=0 do idf=1,idfmax ndf=idf/2 @@ -65,13 +68,18 @@ subroutine q65_loops(c00,npts2,nsps2,nsubmode,ndepth,jpk0, & b90ts = b90/baud call timer('dec2 ',0) call q65_dec2(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded) - nrc=irc call timer('dec2 ',1) ! irc > 0 ==> number of iterations required to decode ! -1 = invalid params ! -2 = decode failed ! -3 = CRC mismatch - if(irc.ge.0) go to 100 + if(irc.ge.0) then + idfbest=idf + idtbest=idt + ndistbest=ndist + nrc=irc + go to 100 + endif enddo ! ibw (b90 loop) enddo ! idt (DT loop) enddo ! idf (f0 loop)