From 4bf5f23c544068c477ae217696db4e45186fea74 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 14 Oct 2020 11:49:27 -0400 Subject: [PATCH] Update QRA test programs. --- lib/qra64a.f90 | 16 ++++++++++++++++ lib/qra65_decode.f90 | 3 ++- lib/test_qra64.f90 | 4 ++-- lib/test_qra65.f90 | 8 ++++---- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/lib/qra64a.f90 b/lib/qra64a.f90 index b062928e1..a8c532266 100644 --- a/lib/qra64a.f90 +++ b/lib/qra64a.f90 @@ -37,6 +37,7 @@ subroutine qra64a(dd,npts,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, & nFadingModel=1 maxaptype=4 if(iand(ndepth,64).ne.0) maxaptype=5 + call qra_params(ndepth,maxaptype,minsync) if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z .or. & maxaptype.ne.maxaptypez) then do naptype=0,maxaptype @@ -93,3 +94,18 @@ subroutine qra64a(dd,npts,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, & return end subroutine qra64a + +subroutine qra_params(ndepth,maxaptype,minsync) + +! If file qra_params is present in CWD, read decoding params from it. + + logical ex + inquire(file='qra_params',exist=ex) + if(ex) then + open(29,file='qra_params',status='old') + read(29,*) ndepth,maxaptype,minsync + close(29) + endif + + return +end subroutine qra_params diff --git a/lib/qra65_decode.f90 b/lib/qra65_decode.f90 index c5ab8521c..b9b9c1a7b 100644 --- a/lib/qra65_decode.f90 +++ b/lib/qra65_decode.f90 @@ -96,6 +96,8 @@ contains ! if(ndepth.eq.2) maxaptype=3 ! if(ndepth.eq.3) maxaptype=5 if(ndepth.ge.2) maxaptype=5 !### + minsync=-2 + call qra_params(ndepth,maxaptype,minsync) if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z .or. & maxaptype.ne.maxaptypez) then @@ -120,7 +122,6 @@ contains fac=1.0/32767.0 dd=fac*iwave - minsync=-2 nmode=65 call ana64(dd,npts,c00) diff --git a/lib/test_qra64.f90 b/lib/test_qra64.f90 index 760c87452..24f54c2d6 100644 --- a/lib/test_qra64.f90 +++ b/lib/test_qra64.f90 @@ -45,7 +45,7 @@ program test_qra64 ! 1 2 3 4 5 6 7 ! 12345678901234567890123456789012345678901234567890123456789012345678901' - cmd1='qra64sim "K1ABC W9XYZ EN37 " A 1 0.2 0.00 100 -20 > junk0' + cmd1='qra64sim "K1ABC W9XYZ EN37 " A 1 0.2 0.00 100 F -20 > junk0' cmd2='jt9 -q -L 300 -H 3000 -f 1000 -d 3 -b A *.wav > junk' @@ -74,7 +74,7 @@ program test_qra64 ndecodes=0 nfalse=0 nretcode=0 - write(cmd1(55:57),'(i3)') nsnr + write(cmd1(57:59),'(i3)') nsnr call system(cmd1) call sec0(0,tdec) call system(cmd2) diff --git a/lib/test_qra65.f90 b/lib/test_qra65.f90 index 4a9881d9f..21cc5caab 100644 --- a/lib/test_qra65.f90 +++ b/lib/test_qra65.f90 @@ -1,6 +1,6 @@ program test_qra65 - character*71 cmd1,cmd2,line + character*73 cmd1,cmd2,line character*22 msg character*8 arg character*1 csubmode @@ -60,8 +60,8 @@ program test_qra65 tsym=1.0/baud ! 1 2 3 4 5 6 7 -! 12345678901234567890123456789012345678901234567890123456789012345678901' - cmd1='qra65sim "K1ABC W9XYZ EN37 " A 1500 5.0 0.0 60 100 -10 > junk0' +! 1234567890123456789012345678901234567890123456789012345678901234567890123' + cmd1='qra65sim "K1ABC W9XYZ EN37 " A 1500 5.0 0.0 60 100 F -10 > junk0' cmd2='jt9 -3 -p 15 -L 300 -H 3000 -d 3 -b A *.wav > junk' write(cmd1(10:33),'(a)') '"'//msg//'"' @@ -90,7 +90,7 @@ program test_qra65 nfalse=0 nretcode=0 navg=0 - write(cmd1(61:63),'(i3)') nsnr + write(cmd1(63:65),'(i3)') nsnr call system(cmd1) call sec0(0,tdec) call system(cmd2)