mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-22 12:08:43 -04:00
Enhancements to Doppler tracking capabilities for EME. Thanks to G3WDG!
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8466 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
da7da823cb
commit
778fd7b3e9
102
astro.cpp
102
astro.cpp
@ -29,7 +29,7 @@ extern "C" {
|
||||
double* ramoon, double* decmoon, double* dgrd, double* poloffset,
|
||||
double* xnr, double* techo, double* width1, double* width2,
|
||||
bool* bTx, const char* AzElFileName, const char* jpleph,
|
||||
int len1, int len2, int len3, int len4);
|
||||
int len1, int len2, int len3, int len4);
|
||||
}
|
||||
|
||||
Astro::Astro(QSettings * settings, Configuration const * configuration, QWidget * parent)
|
||||
@ -38,6 +38,9 @@ Astro::Astro(QSettings * settings, Configuration const * configuration, QWidget
|
||||
, configuration_ {configuration}
|
||||
, ui_ {new Ui::Astro}
|
||||
, m_DopplerMethod {0}
|
||||
, m_dop {0}
|
||||
, m_dop00 {0}
|
||||
, m_dx_two_way_dop {0}
|
||||
{
|
||||
ui_->setupUi (this);
|
||||
setWindowTitle (QApplication::applicationName () + " - " + tr ("Astronomical Data"));
|
||||
@ -70,7 +73,9 @@ void Astro::read_settings ()
|
||||
case 0: ui_->rbNoDoppler->setChecked (true); break;
|
||||
case 1: ui_->rbFullTrack->setChecked (true); break;
|
||||
case 2: ui_->rbConstFreqOnMoon->setChecked (true); break;
|
||||
case 3: ui_->rbRxOnly->setChecked (true); break;
|
||||
case 3: ui_->rbOwnEcho->setChecked (true); break;
|
||||
case 4: ui_->rbOnDxEcho->setChecked (true); break;
|
||||
case 5: ui_->rbCallDx->setChecked (true); break;
|
||||
}
|
||||
move (settings_->value ("window/pos", pos ()).toPoint ());
|
||||
}
|
||||
@ -104,14 +109,15 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
|
||||
double freq8 {static_cast<double> (freq_moon)};
|
||||
auto const& AzElFileName = QDir::toNativeSeparators (configuration_->azel_directory ().absoluteFilePath ("azel.dat"));
|
||||
auto const& jpleph = configuration_->data_dir ().absoluteFilePath ("JPLEPH");
|
||||
int ndop;
|
||||
int ndop00;
|
||||
|
||||
|
||||
|
||||
|
||||
QString mygrid_padded {(mygrid + " ").left (6)};
|
||||
QString hisgrid_padded {(hisgrid + " ").left (6)};
|
||||
astrosub_(&nyear, &month, &nday, &uth, &freq8, mygrid_padded.toLatin1().constData(),
|
||||
hisgrid_padded.toLatin1().constData(), &azsun, &elsun, &azmoon, &elmoon,
|
||||
&azmoondx, &elmoondx, &ntsky, &ndop, &ndop00, &ramoon, &decmoon,
|
||||
&azmoondx, &elmoondx, &ntsky, &m_dop, &m_dop00, &ramoon, &decmoon,
|
||||
&dgrd, &poloffset, &xnr, &techo, &width1, &width2, &bTx,
|
||||
AzElFileName.toLatin1().constData(), jpleph.toLatin1().constData(), 6, 6,
|
||||
AzElFileName.length(), jpleph.length());
|
||||
@ -119,7 +125,7 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
|
||||
if(hisgrid_padded==" ") {
|
||||
azmoondx=0.0;
|
||||
elmoondx=0.0;
|
||||
ndop=0;
|
||||
m_dop=0;
|
||||
width2=0.0;
|
||||
}
|
||||
QString message;
|
||||
@ -132,14 +138,14 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
|
||||
<< qSetRealNumberPrecision (1)
|
||||
<< "Az: " << azmoon << "\n"
|
||||
"El: " << elmoon << "\n"
|
||||
"SelfDop:" << ndop00 << "\n"
|
||||
"SelfDop:" << m_dop00 << "\n"
|
||||
"Width: " << int(width1) << "\n"
|
||||
<< qSetRealNumberPrecision (2)
|
||||
<< "Delay: " << techo << "\n"
|
||||
<< qSetRealNumberPrecision (1)
|
||||
<< "DxAz: " << azmoondx << "\n"
|
||||
"DxEl: " << elmoondx << "\n"
|
||||
"DxDop: " << ndop << "\n"
|
||||
"DxDop: " << m_dop << "\n"
|
||||
"DxWid: " << int(width2) << "\n"
|
||||
"Dec: " << decmoon << "\n"
|
||||
"SunAz: " << azsun << "\n"
|
||||
@ -159,24 +165,48 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
|
||||
switch (m_DopplerMethod)
|
||||
{
|
||||
case 1: // All Doppler correction done here; DX station stays at nominal dial frequency.
|
||||
correction.rx = m_dop;
|
||||
break;
|
||||
case 4: // All Doppler correction done here; DX station stays at nominal dial frequency. (Trial for OnDxEcho)
|
||||
correction.rx = m_dop;
|
||||
break;
|
||||
//case 5: // All Doppler correction done here; DX station stays at nominal dial frequency.
|
||||
|
||||
case 3: // Both stations do full correction on Rx and none on Tx
|
||||
correction.rx = dx_is_self ? ndop00 : ndop;
|
||||
//correction.rx = dx_is_self ? m_dop00 : m_dop;
|
||||
correction.rx = m_dop00; // Now always sets RX to *own* echo freq
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 2:
|
||||
// Doppler correction to constant frequency on Moon
|
||||
correction.rx = ndop00 / 2;
|
||||
correction.rx = m_dop00 / 2;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (3 != m_DopplerMethod) correction.tx = -correction.rx;
|
||||
switch (m_DopplerMethod)
|
||||
{
|
||||
case 1: correction.tx = -correction.rx;
|
||||
break;
|
||||
case 2: correction.tx = -correction.rx;
|
||||
break;
|
||||
case 3: correction.tx = 0;
|
||||
break;
|
||||
case 4: // correction.tx = m_dop - m_dop00;
|
||||
|
||||
correction.tx = m_dx_two_way_dop - m_dop;
|
||||
qDebug () << "correction.tx:" << correction.tx;
|
||||
break;
|
||||
case 5: correction.tx = - m_dop00;
|
||||
break;
|
||||
}
|
||||
//if (3 != m_DopplerMethod || 4 != m_DopplerMethod) correction.tx = -correction.rx;
|
||||
|
||||
if(dx_is_self && m_DopplerMethod == 1) correction.rx = 0;
|
||||
|
||||
if (no_tx_QSY && 3 != m_DopplerMethod && 0 != m_DopplerMethod)
|
||||
{
|
||||
// calculate a single correction for transmit half way through
|
||||
// the period as a compromise for rigs that can't CAT QSY
|
||||
// while transmitting
|
||||
// calculate a single correction for transmit half way through
|
||||
// the period as a compromise for rigs that can't CAT QSY
|
||||
// while transmitting
|
||||
//
|
||||
// use a base time of (secs-since-epoch + 2) so as to be sure
|
||||
// we do the next period if we calculate just before it starts
|
||||
@ -194,7 +224,7 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
|
||||
double uth {nhr + nmin/60.0 + sec/3600.0};
|
||||
astrosub_(&nyear, &month, &nday, &uth, &freq8, mygrid_padded.toLatin1().constData(),
|
||||
hisgrid_padded.toLatin1().constData(), &azsun, &elsun, &azmoon, &elmoon,
|
||||
&azmoondx, &elmoondx, &ntsky, &ndop, &ndop00, &ramoon, &decmoon,
|
||||
&azmoondx, &elmoondx, &ntsky, &m_dop, &m_dop00, &ramoon, &decmoon,
|
||||
&dgrd, &poloffset, &xnr, &techo, &width1, &width2, &bTx,
|
||||
"", jpleph.toLatin1().constData(), 6, 6,
|
||||
0, jpleph.length());
|
||||
@ -203,15 +233,27 @@ auto Astro::astroUpdate(QDateTime const& t, QString const& mygrid, QString const
|
||||
{
|
||||
case 1:
|
||||
// All Doppler correction done here; DX station stays at nominal dial frequency.
|
||||
offset = dx_is_self ? ndop00 : ndop;
|
||||
offset = dx_is_self ? m_dop00 : m_dop;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// Doppler correction to constant frequency on Moon
|
||||
offset = ndop00 / 2;
|
||||
offset = m_dop00 / 2;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// Doppler correction for OnDxEcho
|
||||
offset = m_dop - m_dx_two_way_dop;
|
||||
break;
|
||||
|
||||
//case 5: correction.tx = - m_dop00;
|
||||
case 5: offset = m_dop00;// version for _7
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
correction.tx = -offset;
|
||||
qDebug () << "correction.tx (no tx qsy):" << correction.tx;
|
||||
}
|
||||
}
|
||||
return correction;
|
||||
@ -235,13 +277,31 @@ void Astro::on_rbFullTrack_clicked()
|
||||
Q_EMIT tracking_update ();
|
||||
}
|
||||
|
||||
void Astro::on_rbRxOnly_clicked()
|
||||
void Astro::on_rbOnDxEcho_clicked(bool checked)
|
||||
{
|
||||
m_DopplerMethod = 4;
|
||||
check_split ();
|
||||
if (checked) {
|
||||
m_dx_two_way_dop = 2 * (m_dop - (m_dop00/2));
|
||||
qDebug () << "Starting Doppler:" << m_dx_two_way_dop;
|
||||
}
|
||||
Q_EMIT tracking_update ();
|
||||
}
|
||||
|
||||
void Astro::on_rbOwnEcho_clicked()
|
||||
{
|
||||
m_DopplerMethod = 3;
|
||||
check_split ();
|
||||
Q_EMIT tracking_update ();
|
||||
}
|
||||
|
||||
void Astro::on_rbCallDx_clicked()
|
||||
{
|
||||
m_DopplerMethod = 5;
|
||||
check_split ();
|
||||
Q_EMIT tracking_update ();
|
||||
}
|
||||
|
||||
void Astro::on_rbConstFreqOnMoon_clicked()
|
||||
{
|
||||
m_DopplerMethod = 2;
|
||||
|
7
astro.h
7
astro.h
@ -57,8 +57,10 @@ protected:
|
||||
private slots:
|
||||
void on_rbConstFreqOnMoon_clicked();
|
||||
void on_rbFullTrack_clicked();
|
||||
void on_rbRxOnly_clicked();
|
||||
void on_rbOwnEcho_clicked();
|
||||
void on_rbNoDoppler_clicked();
|
||||
void on_rbOnDxEcho_clicked(bool);
|
||||
void on_rbCallDx_clicked();
|
||||
void on_cbDopplerTracking_toggled(bool);
|
||||
|
||||
private:
|
||||
@ -71,6 +73,9 @@ private:
|
||||
QScopedPointer<Ui::Astro> ui_;
|
||||
|
||||
qint32 m_DopplerMethod;
|
||||
int m_dop;
|
||||
int m_dop00;
|
||||
int m_dx_two_way_dop;
|
||||
};
|
||||
|
||||
inline
|
||||
|
34
astro.ui
34
astro.ui
@ -48,12 +48,12 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbRxOnly">
|
||||
<widget class="QRadioButton" name="rbOwnEcho">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Both stations do full correction to their QSO partner's grid square during receive, no correction is applied on transmit.</p><p>This mode facilitates accurate Doppler shift correction when one or both stations have a rig that does not accept CAT QSY commands while transmitting.</p></body></html></string>
|
||||
<string><html><head/><body><p>Transmit takes place on sked frequency and receive frequency is corrected for own echoes. </p><p>This mode can be used for calling CQ, or when using Echo mode.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Receive only</string>
|
||||
<string>Own Echo</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -70,6 +70,32 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbOnDxEcho">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>DX station announces their TX Freq, which is entered as the Sked Freq. Correction applied to RX and TX so you appear on the DX's station's own echo Freq.</p><p>If the rig does not accept CAT QSY commands while transmitting a single correction is applied for the whole transmit period.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>On DX Echo</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbCallDx">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Tune radio manually and select this mode to put your echo on the same frequency.</p><p>If the rig does not accept CAT QSY commands while transmitting a single correction is applied for the whole transmit period.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Call DX</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbNoDoppler">
|
||||
<property name="toolTip">
|
||||
@ -83,7 +109,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
Loading…
Reference in New Issue
Block a user