From 31bc12e3b9dc73ff947277e7774b68de893aff1e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 11 Feb 2023 14:08:10 -0500 Subject: [PATCH] Increase ibwb; enforce MAX_CALLERS. --- lib/q65_decode.f90 | 7 ++++--- lib/qra/q65/q65.f90 | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index 318504314..e4facadd9 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -169,7 +169,8 @@ contains if(mode_q65.eq.2) ibwa=10 !Q65-60E !### - ibwb=min(15,ibwa+4) +! ibwb=min(15,ibwa+4) + ibwb=min(15,ibwa+6) maxiters=40 if(iand(ndepth,3).eq.2) maxiters=60 if(iand(ndepth,3).eq.3) then @@ -177,7 +178,6 @@ contains ibwb=ibwb+2 maxiters=100 endif -! print*,'a',iand(ndepth,3),ibwa,ibwb,maxiters ! Generate codewords for full-AP list decoding if(ichar(hiscall(1:1)).eq.0) hiscall=' ' @@ -185,7 +185,8 @@ contains ncw=0 if(nqd.eq.1 .or. lagain) then if(ncontest.eq.1) then - call q65_set_list2(mycall,hiscall,hisgrid,callers,nhist2,codewords,ncw) + call q65_set_list2(mycall,hiscall,hisgrid,callers,nhist2, & + codewords,ncw) else call q65_set_list(mycall,hiscall,hisgrid,codewords,ncw) endif diff --git a/lib/qra/q65/q65.f90 b/lib/qra/q65/q65.f90 index a62193df8..07676e13b 100644 --- a/lib/qra/q65/q65.f90 +++ b/lib/qra/q65/q65.f90 @@ -895,6 +895,11 @@ subroutine q65_hist2(msg0,callers,nhist2) enddo if(newcall .and. isgrid(g4)) then + if(nhist2.eq.MAX_CALLERS) then +! Purge the oldest caller + callers(1:MAX_CALLERS-1)=callers(2:MAX_CALLERS) + nhist2=nhist2-1 + endif nhist2=nhist2+1 callers(nhist2)%call=c6 callers(nhist2)%grid=g4