Make ALL.TXT Rx timestamp equal to the beginning of the TR period, even if the decode comes in after the start of the next TR period. Make Tx timestamp the actual time that Tx started.

This commit is contained in:
Steven Franke 2020-03-05 11:16:56 -06:00
parent 02eb4fe90b
commit 07c753e284

View File

@ -8746,7 +8746,11 @@ 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()-0.4*m_TRperiod),m_TRperiod));
double tdec = fmod(double(time.time().second()),m_TRperiod);
if( txRx=="Rx" && tdec < 0.4*m_TRperiod ) {
tdec+=m_TRperiod;
}
if( txRx=="Rx" ) time = time.addSecs(-tdec);
t.sprintf("%10.3f ",m_freqNominal/1.e6);
if (m_diskData) {
if (m_fileDateTime.size()==11) {