From 00210d1141aa3b7bc30d3ea1875de2baa914bdea Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 26 Feb 2020 13:14:49 -0500 Subject: [PATCH 1/2] Minor code cleanup in subtractft9.f90. --- lib/ft8/subtractft8.f90 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/ft8/subtractft8.f90 b/lib/ft8/subtractft8.f90 index 00b526934..04c8a6bb0 100644 --- a/lib/ft8/subtractft8.f90 +++ b/lib/ft8/subtractft8.f90 @@ -37,15 +37,13 @@ subroutine subtractft8(dd0,itone,f0,dt,ldt) first=.false. endif -! Generate complex reference waveform +! Generate complex reference waveform cref call gen_ft8wave(itone,79,1920,2.0,12000.0,f0,cref,xjunk,1,NFRAME) - if(ldt) then !Are we refining DT ? + if(ldt) then !Are we refining DT ? sqa=sqf(-300) sqb=sqf(300) - endif - sq0=sqf(0) !Do the subtraction with idt=0 - if(ldt) then + sq0=sqf(0) !Do the subtraction with idt=0 call peakup(sqa,sq0,sqb,dx) if(abs(dx).gt.1.0) return !No acceptable minimum: do not subtract i1=nint(300.0*dx) !First approximation of best idt @@ -56,9 +54,10 @@ subroutine subtractft8(dd0,itone,f0,dt,ldt) if(abs(dx).gt.1.0) return !No acceptable minimum: do not subtract i2=nint(60.0*dx) + i1 !Best estimate of idt sq0=sqf(i2) !Do the subtraction with idt=i2 + else + sq0=sqf(0) !Do the subtraction with idt=0 endif dd0=dd !Return dd0 with this signal subtracted - return contains From 6afff5821ec563298ee6e34eb32899d31fee69e8 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 26 Feb 2020 13:15:22 -0500 Subject: [PATCH 2/2] Correct the times written to ALL.TXT when decode occurs after the T/R boundary. --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index a90ab8992..dd95fc144 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -8746,7 +8746,7 @@ void MainWindow::write_all(QString txRx, QString message) t.sprintf("%5d",ui->TxFreqSpinBox->value()); if (txRx=="Tx") msg=" 0 0.0" + t + " " + message; auto time = QDateTime::currentDateTimeUtc (); - time = time.addSecs(-fmod(double(time.time().second()),m_TRperiod)); + time = time.addSecs(-fmod(double(time.time().second()-0.4*m_TRperiod),m_TRperiod)); t.sprintf("%10.3f ",m_freqNominal/1.e6); if (m_diskData) { if (m_fileDateTime.size()==11) {