Add some timer calls; fix reporting of FT8 spots to PSKreporter.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7755 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-06-30 20:11:07 +00:00
parent ec34c3b03b
commit f6ecfec363
3 changed files with 10 additions and 4 deletions

View File

@ -133,6 +133,7 @@ QString DecodedText::call()
void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid) void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid)
{ {
auto msg = _string; auto msg = _string;
if(msg.mid(4,1)!=" ") msg=msg.mid(0,4)+msg.mid(6,-1); //Remove seconds from UTC
msg = msg.replace (QRegularExpression {" CQ ([A-Z]{2,2}|[0-9]{3,3}) "}, " CQ_\\1 ").mid (column_qsoText); msg = msg.replace (QRegularExpression {" CQ ([A-Z]{2,2}|[0-9]{3,3}) "}, " CQ_\\1 ").mid (column_qsoText);
int i1 = msg.indexOf (" "); int i1 = msg.indexOf (" ");
call = msg.mid (i1 + 1); call = msg.mid (i1 + 1);

View File

@ -1,5 +1,6 @@
subroutine ft8b(s,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message) subroutine ft8b(s,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message)
use timer_module, only: timer
include 'ft8_params.f90' include 'ft8_params.f90'
parameter(NRECENT=10) parameter(NRECENT=10)
character*12 recent_calls(NRECENT) character*12 recent_calls(NRECENT)
@ -12,11 +13,11 @@ subroutine ft8b(s,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message)
max_iterations=40 max_iterations=40
norder=2 norder=2
if(abs(nfqso-f1).lt.10.0) norder=3 ! if(abs(nfqso-f1).lt.10.0) norder=3
tstep=0.5*NSPS/12000.0 tstep=0.5*NSPS/12000.0
df=12000.0/NFFT1 df=12000.0/NFFT1
i0=nint(f1/df) i0=max(1,nint(f1/df))
j0=nint(xdt/tstep) j0=nint(xdt/tstep)
j=0 j=0
@ -58,10 +59,14 @@ subroutine ft8b(s,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message)
! cw will be needed for subtraction. ! cw will be needed for subtraction.
! dmin is the correlation discrepancy of a returned codeword - it is ! dmin is the correlation discrepancy of a returned codeword - it is
! used to select the best codeword within osd174. ! used to select the best codeword within osd174.
call timer('bpd174 ',0)
call bpdecode174(llr,apmask,max_iterations,decoded,cw,nharderrors) call bpdecode174(llr,apmask,max_iterations,decoded,cw,nharderrors)
call timer('bpd174 ',1)
dmin=0.0 dmin=0.0
if(nharderrors.lt.0) then if(nharderrors.lt.0) then
call timer('osd174 ',0)
call osd174(llr,norder,decoded,cw,nharderrors,dmin) call osd174(llr,norder,decoded,cw,nharderrors,dmin)
call timer('osd174 ',1)
! This threshold needs to be tuned. 99.0 should pass everything. ! This threshold needs to be tuned. 99.0 should pass everything.
if( dmin .gt. 99.0 ) nharderrors=-1 if( dmin .gt. 99.0 ) nharderrors=-1
endif endif

View File

@ -2729,7 +2729,7 @@ void MainWindow::readFromStdout() //readFromStdout
Radio::base_callsign(ui->dxCallEntry->text()), m_rptRcvd); Radio::base_callsign(ui->dxCallEntry->text()), m_rptRcvd);
// extract details and send to PSKreporter // extract details and send to PSKreporter
int nsec=QDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged; int nsec=QDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged;
bool okToPost=(nsec>50); bool okToPost=(nsec>(4*m_TRperiod)/5);
if(m_config.spot_to_psk_reporter () and stdMsg and !m_diskData and okToPost) { if(m_config.spot_to_psk_reporter () and stdMsg and !m_diskData and okToPost) {
pskPost(decodedtext); pskPost(decodedtext);
} }
@ -2774,7 +2774,7 @@ void MainWindow::pskPost(DecodedText decodedtext)
Frequency frequency = m_freqNominal + audioFrequency; Frequency frequency = m_freqNominal + audioFrequency;
pskSetLocal (); pskSetLocal ();
if(grid_regexp.exactMatch (grid)) { if(grid_regexp.exactMatch (grid)) {
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr; qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode, psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode,
QString::number(snr),QString::number(QDateTime::currentDateTime().toTime_t())); QString::number(snr),QString::number(QDateTime::currentDateTime().toTime_t()));
} }