From c5ecd9fc76800827961ae850b2f9dbece1c62418 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 8 Jul 2021 10:06:21 -0400 Subject: [PATCH] Pass nhsym from GUI to m65. --- map65/commons.h | 1 + map65/libm65/decode0.f90 | 10 ++-------- map65/libm65/m65.f90 | 4 ++-- map65/libm65/m65a.f90 | 4 ++-- map65/mainwindow.cpp | 1 + 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/map65/commons.h b/map65/commons.h index 257c2ac2e..c74787c35 100644 --- a/map65/commons.h +++ b/map65/commons.h @@ -34,6 +34,7 @@ extern struct { //This is "common/datcom/..." in Fortran int nfast; //No longer used int nsave; //Number of s3(64,63) spectra saved int max_drift; //Maximum Q65 drift: units symbol_rate/TxT + int nhsym; //Number of available JT65 half-symbols char mycall[12]; char mygrid[6]; char hiscall[12]; diff --git a/map65/libm65/decode0.f90 b/map65/libm65/decode0.f90 index a98a972a6..6bf9655c4 100644 --- a/map65/libm65/decode0.f90 +++ b/map65/libm65/decode0.f90 @@ -11,19 +11,13 @@ subroutine decode0(dd,ss,savg,nstandalone) common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & - nfast,nsave,max_drift,mycall,mygrid,hiscall,hisgrid,datetime + nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime data neme0/-99/,mcall3b/1/ save call timer('decode0 ',0) if(newdat.ne.0) then - istep=10000 - do i=NSMAX,1,-istep - n=maxval(abs(dd(1,i-istep+1:i))) - if(n.gt.10) exit - enddo - nz=i - nhsym=5.3833*nz/96000.0 + nz=96000*nhsym/5.3833 hist=0 do i=1,nz j1=min(abs(dd(1,i)),32768.0) diff --git a/map65/libm65/m65.f90 b/map65/libm65/m65.f90 index 179ffceb8..960883563 100644 --- a/map65/libm65/m65.f90 +++ b/map65/libm65/m65.f90 @@ -36,11 +36,11 @@ program m65 real*8 fc0,fcenter character*80 arg,infile character mycall*12,hiscall*12,mygrid*6,hisgrid*6,datetime*20 - common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fc0,nutc0,junk(37) + common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fc0,nutc0,junk(38) common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & - nfast,nsave,max_drift,mycall,mygrid,hiscall,hisgrid,datetime + nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime nargs=iargc() if(nargs.ne.1 .and. nargs.lt.5) then diff --git a/map65/libm65/m65a.f90 b/map65/libm65/m65a.f90 index 385254442..33c193d93 100644 --- a/map65/libm65/m65a.f90 +++ b/map65/libm65/m65a.f90 @@ -72,14 +72,14 @@ end subroutine m65b subroutine m65c(dd,ss,savg,nparams0) real*4 dd(4,5760000),ss(4,322,32768),savg(4,32768) real*8 fcenter - integer nparams0(40),nparams(40) + integer nparams0(41),nparams(41) character*12 mycall,hiscall character*6 mygrid,hisgrid character*20 datetime common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & - nfast,nsave,max_drift,mycall,mygrid,hiscall,hisgrid,datetime + nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime equivalence (nparams,fcenter) nparams=nparams0 !Copy parameters into common/npar/ diff --git a/map65/mainwindow.cpp b/map65/mainwindow.cpp index e8f574f9f..f98e9472a 100644 --- a/map65/mainwindow.cpp +++ b/map65/mainwindow.cpp @@ -624,6 +624,7 @@ void MainWindow::dataSink(int k) if(ihsym == 302) { //For Q65, decode at t=56 s datcom_.newdat=1; datcom_.nagain=0; + datcom_.nhsym=ihsym; QDateTime t = QDateTime::currentDateTimeUtc(); m_dateTime=t.toString("yyyy-MMM-dd hh:mm"); decode(); //Start the decoder