From 31bedb8528db02de2504f2ec157f4d6164b787e7 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 20 Jan 2023 14:09:51 -0500 Subject: [PATCH] Optional q65 decoding params from q65_params.txt. Maybe temporary! --- lib/q65_decode.f90 | 15 ++++++++++++++- lib/qra/q65/q65.f90 | 13 ++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index 4990a24ec..aa7acb5b9 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -73,8 +73,9 @@ contains real f0decodes(100) integer dat4(13) !Decoded message as 12 6-bit integers integer dgen(13) + integer nq65param(0:7) logical lclearave,lnewdat0,lapcqonly,unpk77_success - logical single_decode,lagain + logical single_decode,lagain,ex complex, allocatable :: c00(:) !Analytic signal, 6000 Sa/s complex, allocatable :: c0(:) !Analytic signal, 6000 Sa/s integer stageno !Added by W3SZ @@ -147,6 +148,18 @@ contains ibwb=min(10,ibwb+1) maxiters=60 endif + inquire(file='q65_params.txt',exist=ex) + if(ex) then + open(28,file='q65_params.txt',status='old') + read(28,*) nq65param + ibwa=max(1,nq65param(nsubmode)) + ibwa=min(40,ibwa) + ibwb=ibwa + maxiters=nq65param(4+iand(ndepth,3)) + close(28) + endif +! write(*,3001) iand(ndepth,3),nsubmode,ibwa,ibwb,maxiters +!3001 format(5i5) ! Generate codewords for full-AP list decoding if(ichar(hiscall(1:1)).eq.0) hiscall=' ' if(ichar(hisgrid(1:1)).eq.0) hisgrid=' ' diff --git a/lib/qra/q65/q65.f90 b/lib/qra/q65/q65.f90 index 5baff4af1..956b1f53d 100644 --- a/lib/qra/q65/q65.f90 +++ b/lib/qra/q65/q65.f90 @@ -396,7 +396,18 @@ subroutine q65_dec_q012(s3,LL,snr2,dat4,idec,decoded) read(c78,1060) apsymbols endif - do ibw=ibwa,ibwb +! do ibw=ibwa,ibwb +!### + ibw_mid=(ibwa+ibwb)/2 + iimax=3 + if(maxiters.eq.40) iimax=5 + if(maxiters.eq.60) iimax=7 +! print*,'a',maxiters,ibwa,ibwb,ibw_mid,iimax + do ii=1,iimax + n=ii/2 + if(iand(ii,1).eq.0) n=-n + ibw=ibw_mid + n +!### b90=1.72**ibw b90ts=b90/baud call q65_dec2(s3,nsubmode,b90ts,esnodb,irc,dat4,decoded)