From 41ce20101f0ca1e262dea2c76ae7a8db73d9e31f Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 12 Mar 2021 14:27:58 -0500 Subject: [PATCH] Q65 sync curves linear up to 10, then logarithmic. AutoClrAvg only for decodes at RxFreq, and never for "lagain" decode attempts. --- lib/q65_decode.f90 | 8 ++++++-- lib/qra/q65/q65.f90 | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index a793c87d5..9ce05b6e6 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -234,7 +234,9 @@ contains nsnr=nint(snr2) call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded, & idec,nused,ntrperiod) - if(iand(ndepth,128).ne.0) call q65_clravg !AutoClrAvg after decode +! if(iand(ndepth,128).ne.0) call q65_clravg !AutoClrAvg after decode + if(iand(ndepth,128).ne.0 .and. .not.lagain .and. & + int(abs(f0dec-nfqso)).le.ntol ) call q65_clravg !AutoClrAvg call sec0(1,tdecode) open(22,file=trim(data_dir)//'/q65_decodes.dat',status='unknown', & position='append',iostat=ios) @@ -316,7 +318,9 @@ contains nsnr=nint(snr2) call this%callback(nutc,snr1,nsnr,dtdec,f0dec,decoded, & idec,nused,ntrperiod) - if(iand(ndepth,128).ne.0) call q65_clravg !AutoClrAvg after decode +! if(iand(ndepth,128).ne.0) call q65_clravg !AutoClrAvg after decode + if(iand(ndepth,128).ne.0 .and. .not.lagain .and. & + int(abs(f0dec-nfqso)).le.ntol ) call q65_clravg !AutoClrAvg call sec0(1,tdecode) open(22,file=trim(data_dir)//'/q65_decodes.dat',status='unknown', & position='append',iostat=ios) diff --git a/lib/qra/q65/q65.f90 b/lib/qra/q65/q65.f90 index 209528387..309646e71 100644 --- a/lib/qra/q65/q65.f90 +++ b/lib/qra/q65/q65.f90 @@ -583,8 +583,12 @@ subroutine q65_write_red(iz,xdt,ccf2_avg,ccf2) write(17,1000) xdt do i=max(1,nint(nfa/df)),nint(nfb/df) freq=i*df - write(17,1000) freq,ccf2_avg(i),ccf2(i) -1000 format(f10.3,2e12.3) + y1=ccf2_avg(i) + if(y1.gt.10.0) y1=10.0 + 2.0*log10(y1/10.0) + y2=ccf2(i) + if(y2.gt.10.0) y2=10.0 + 2.0*log10(y2/10.0) + write(17,1000) freq,y1,y2 +1000 format(3f10.3) enddo flush(17)