Move >=50MHz check for Doppler tracking back to the main window

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5594 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2015-06-12 00:26:36 +00:00
parent 724d5703c4
commit 98f84a5902
2 changed files with 25 additions and 27 deletions

View File

@ -147,34 +147,31 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
ui_->text_label->setText(message);
FrequencyDelta astro_correction {0};
//Apply Doppler corrections only for 50 MHz and above
if (freq_moon >= 50000000) {
if (ui_->cbDopplerTracking->isChecked ()) {
switch (m_DopplerMethod)
{
case 1:
// All Doppler correction done here; DX station stays at nominal dial frequency.
if(dx_is_self) {
astro_correction = m_stepHz*qRound(double(ndop00)/m_stepHz);
} else {
astro_correction = m_stepHz*qRound(double(ndop)/m_stepHz);
}
break;
case 2:
// Doppler correction to constant frequency on Moon
astro_correction = m_stepHz*qRound(double(ndop00/2.0)/m_stepHz);
break;
}
if (bTx) {
astro_correction = 1000 * m_kHz + m_Hz - astro_correction;
} else {
if(dx_is_self && m_DopplerMethod==1) {
astro_correction = 1000*m_kHz + m_Hz;
if (ui_->cbDopplerTracking->isChecked ()) {
switch (m_DopplerMethod)
{
case 1:
// All Doppler correction done here; DX station stays at nominal dial frequency.
if(dx_is_self) {
astro_correction = m_stepHz*qRound(double(ndop00)/m_stepHz);
} else {
astro_correction += 1000*m_kHz + m_Hz;
astro_correction = m_stepHz*qRound(double(ndop)/m_stepHz);
}
break;
case 2:
// Doppler correction to constant frequency on Moon
astro_correction = m_stepHz*qRound(double(ndop00/2.0)/m_stepHz);
break;
}
if (bTx) {
astro_correction = 1000 * m_kHz + m_Hz - astro_correction;
} else {
if(dx_is_self && m_DopplerMethod==1) {
astro_correction = 1000*m_kHz + m_Hz;
} else {
astro_correction += 1000*m_kHz + m_Hz;
}
}
}

View File

@ -2151,7 +2151,8 @@ void MainWindow::guiUpdate()
if (m_astroWidget) {
auto astro_correction = m_astroWidget->astroUpdate(t, m_config.my_grid (), m_hisGrid
, m_dialFreq, "Echo" == m_mode, m_transmitting);
if (!m_bSimplex) { // only adjust frequency if allowed by mode
if (!m_bSimplex // only adjust frequency if allowed by mode
&& m_dialFreq >= 50000000) { // and above 50MHz
if(m_transmitting) {
m_dialFreqTx = m_freqNominal + astro_correction;
ui->labDialFreq->setText (Radio::pretty_frequency_MHz_string (m_dialFreqTx));