From bf8e290bbd2e86f546d2b3244a6bc516ad1cbad4 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 7 Nov 2016 16:58:37 +0000 Subject: [PATCH] Send required parameters to qra64_dec(). git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7300 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/qra/qra64/qra64_subs.c | 9 +++++---- lib/qra64a.f90 | 9 +++++++-- lib/spec64.f90 | 2 -- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/qra/qra64/qra64_subs.c b/lib/qra/qra64/qra64_subs.c index 1633f52cf..dd01adfee 100644 --- a/lib/qra/qra64/qra64_subs.c +++ b/lib/qra/qra64/qra64_subs.c @@ -15,7 +15,8 @@ void qra64_enc_(int x[], int y[]) } void qra64_dec_(float r[], int* nc1, int* nc2, int* ng2, int* APtype, - int* iset, int xdec[], float* snr, int* rc) + int* iset, int* ns0, float* b0, int* nf0, + int xdec[], float* snr, int* rc) { /* APtype: @@ -43,9 +44,9 @@ void qra64_dec_(float r[], int* nc1, int* nc2, int* ng2, int* APtype, static int nc1z=-1; float EbNodBEstimated; int err=0; - int nSubmode=0; - int nFadingModel=1; - float b90=1.0; + int nSubmode=*ns0; + float b90=*b0; + int nFadingModel=*nf0; #ifdef NICO_WANTS_SNR_DUMP FILE *fout; diff --git a/lib/qra64a.f90 b/lib/qra64a.f90 index ca4b58f7f..a45f70dcd 100644 --- a/lib/qra64a.f90 +++ b/lib/qra64a.f90 @@ -27,9 +27,13 @@ subroutine qra64a(dd,nutc,nf1,nf2,nfqso,ntol,mode64,mycall_12,hiscall_12, & call packcall(mycall,nc1,ltext) call packcall(hiscall,nc2,ltext) call packgrid(hisgrid,ng2,ltext) + nSubmode=nint(log(float(mode64)/log(2.0))) + b90=1.0 + nFadingModel=1 if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z) then do naptype=0,5 - call qra64_dec(s3,nc1,nc2,ng2,naptype,1,dat4,snr2,irc) + call qra64_dec(s3,nc1,nc2,ng2,naptype,1,nSubmode,b90, & + nFadingModel,dat4,snr2,irc) enddo nc1z=nc1 nc2z=nc2 @@ -55,7 +59,8 @@ subroutine qra64a(dd,nutc,nf1,nf2,nfqso,ntol,mode64,mycall_12,hiscall_12, & a(2)=-0.67*(idf1 + 0.67*kpk) call twkfreq(c00,c0,npts2,4000.0,a) call spec64(c0,npts2,mode64,jpk,s3,LL,NN) - call qra64_dec(s3,nc1,nc2,ng2,naptype,0,dat4,snr2,irc) + call qra64_dec(s3,nc1,nc2,ng2,naptype,0,nSubmode,b90, & + nFadingModel,dat4,snr2,irc) decoded=' ' if(irc.ge.0) then call unpackmsg(dat4,decoded) !Unpack the user message diff --git a/lib/spec64.f90 b/lib/spec64.f90 index 9ceb685fa..064329b2b 100644 --- a/lib/spec64.f90 +++ b/lib/spec64.f90 @@ -6,8 +6,6 @@ subroutine spec64(c0,npts2,mode64,jpk,s3,LL,NN) real s3(LL,NN) !Synchronized symbol spectra nfft6=nsps - fsample=4000.0 - df=fsample/nfft6 do j=1,63 jj=j+7 !Skip first Costas array if(j.ge.32) jj=j+14 !Skip middle Costas array