From 33b174256886abd9be512bb553edd07c33244c3d Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 26 Jul 2017 21:19:21 +0000 Subject: [PATCH] Add QSO state machine state and tx audio offset to parameters passed to slow decoders Required to pick best AP masks in FT8 decoder git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7958 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- commons.h | 3 +++ lib/decoder.f90 | 4 ++-- lib/ft8_decode.f90 | 4 ++-- lib/jt9com.f90 | 2 ++ mainwindow.cpp | 2 ++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/commons.h b/commons.h index 4b8d7672d..32b4c082e 100644 --- a/commons.h +++ b/commons.h @@ -26,7 +26,10 @@ extern struct dec_data { int nutc; //UTC as integer, HHMM bool ndiskdat; //true ==> data read from *.wav file int ntrperiod; //TR period (seconds) + int nQSOProgress; /* QSO state machine state */ int nfqso; //User-selected QSO freq (kHz) + int nftx; /* Transmit audio offset where + replies might be expected */ bool newdat; //true ==> new data, must do long FFT int npts8; //npts for c0() array int nfa; //Low decode limit (Hz) diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 6787b879a..e6995961b 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -70,8 +70,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample) ! We're in FT8 mode call timer('decft8 ',0) newdat=params%newdat - call my_ft8%decode(ft8_decoded,id2,params%nfqso, & - newdat,params%nutc,params%nfa, & + call my_ft8%decode(ft8_decoded,id2,params%nQSOProgress,params%nfqso, & + params%nftx,newdat,params%nutc,params%nfa, & params%nfb,logical(params%nagain), & params%ndepth,logical(params%lapon),params%napwid,params%nsubmode, & params%mycall,params%hiscall,params%hisgrid) diff --git a/lib/ft8_decode.f90 b/lib/ft8_decode.f90 index 9fd2b8403..eba4d88ee 100644 --- a/lib/ft8_decode.f90 +++ b/lib/ft8_decode.f90 @@ -23,8 +23,8 @@ module ft8_decode contains - subroutine decode(this,callback,iwave,nfqso,newdat,nutc,nfa, & - nfb,nagain,ndepth,lapon,napwid,nsubmode,mycall12,hiscall12,hisgrid6) + subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat,nutc, & + nfa,nfb,nagain,ndepth,lapon,napwid,nsubmode,mycall12,hiscall12,hisgrid6) ! use wavhdr use timer_module, only: timer include 'fsk4hf/ft8_params.f90' diff --git a/lib/jt9com.f90 b/lib/jt9com.f90 index 23ec1e643..f42e55d1d 100644 --- a/lib/jt9com.f90 +++ b/lib/jt9com.f90 @@ -9,7 +9,9 @@ integer(c_int) :: nutc logical(c_bool) :: ndiskdat integer(c_int) :: ntr + integer(c_int) :: nQSOProgress ! See MainWindow::m_QSOProgress for values integer(c_int) :: nfqso + integer(c_int) :: nftx logical(c_bool) :: newdat integer(c_int) :: npts8 integer(c_int) :: nfa diff --git a/mainwindow.cpp b/mainwindow.cpp index bcf132d21..bb953c0a4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2435,7 +2435,9 @@ void MainWindow::decode() //decode() dec_data.params.nutc=10000*ihr + 100*imin + isec; } if(m_nPick==2) dec_data.params.nutc=m_nutc0; + dec_data.params.nQSOProgress = m_QSOProgress; dec_data.params.nfqso=m_wideGraph->rxFreq(); + dec_data.params.nftx = ui->TxFreqSpinBox->value (); qint32 depth {m_ndepth}; if (!ui->actionInclude_averaging->isVisible ()) depth &= ~16; if (!ui->actionInclude_correlation->isVisible ()) depth &= ~32;