From dbdfbb41a762f2c22229c9934e09828f1014bea4 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 21 Jul 2022 13:42:08 -0400 Subject: [PATCH] More WIP on Echo mode. --- widgets/astro.cpp | 2 ++ widgets/astro.h | 4 ++++ widgets/mainwindow.cpp | 13 +++++++------ widgets/mainwindow.h | 1 + 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/widgets/astro.cpp b/widgets/astro.cpp index 5ef9a8ec5..470311c25 100644 --- a/widgets/astro.cpp +++ b/widgets/astro.cpp @@ -250,6 +250,8 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const //qDebug () << "correction.tx (no tx qsy):" << correction.tx; } } + correction.wself=width1; + correction.wdx=width2; return correction; } diff --git a/widgets/astro.h b/widgets/astro.h index e627d3bbd..25ffe75ff 100644 --- a/widgets/astro.h +++ b/widgets/astro.h @@ -32,6 +32,8 @@ public: Correction () : rx {0} , tx {0} + , wself {0} + , wdx {0} {} Correction (Correction const&) = default; Correction& operator = (Correction const&) = default; @@ -45,6 +47,8 @@ public: FrequencyDelta rx; FrequencyDelta tx; + double wself; + double wdx; }; Correction astroUpdate(QDateTime const& t, diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 3726ff7cc..82094e9d5 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -7910,10 +7910,10 @@ void MainWindow::transmit (double snr) } if(m_mode=="Echo") { - //??? should use "fastMode = true" here ??? - Q_EMIT sendMessage (m_mode, 27, 1024.0, 1500.0, 0.0, m_soundOutput, - m_config.audio_output_channel(), - false, false, snr, m_TRperiod); + m_echoFreq=1500.0; + if(m_astroWidget->bDither()) m_echoFreq=1490.0 + QRandomGenerator::global()->bounded(20.0); //Dither by +/- 10 Hz + Q_EMIT sendMessage (m_mode, 27, 1024.0, m_echoFreq, 0.0, m_soundOutput, + m_config.audio_output_channel(), false, false, snr, m_TRperiod); } // In auto-sequencing mode, stop after 5 transmissions of "73" message. @@ -8723,9 +8723,10 @@ void MainWindow::astroUpdate () m_freqNominal, "Echo" == m_mode, m_transmitting, !m_config.tx_QSY_allowed (), m_TRperiod); - qDebug() << "aa" << correction.tx << correction.rx << m_astroWidget->nfRIT() + + qDebug() << "aa" << correction.rx << m_astroWidget->nfRIT() << m_astroWidget->bDither() << m_config.transceiver_resolution () - << m_freqNominal; + << m_freqNominal << m_echoFreq << correction.wself << correction.wdx; // no Doppler correction in Tx if rig can't do it if (m_transmitting && !m_config.tx_QSY_allowed ()) return; if (!m_astroWidget->doppler_tracking ()) return; diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 01c142e88..d80befc19 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -432,6 +432,7 @@ private: double m_tRemaining; double m_TRperiod; + double m_echoFreq; float m_DTtol; float m_t0;