2014-12-02 19:06:54 -05:00
|
|
|
// -*- Mode: C++ -*-
|
|
|
|
#ifndef ASTRO_H
|
|
|
|
#define ASTRO_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
2015-06-11 09:36:13 -04:00
|
|
|
#include "Radio.hpp"
|
2014-12-02 19:06:54 -05:00
|
|
|
|
|
|
|
class QSettings;
|
2015-06-11 09:36:13 -04:00
|
|
|
class Configuration;
|
2014-12-02 19:06:54 -05:00
|
|
|
namespace Ui {
|
|
|
|
class Astro;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Astro final
|
|
|
|
: public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT;
|
|
|
|
|
2015-06-11 09:36:13 -04:00
|
|
|
using Frequency = Radio::Frequency;
|
|
|
|
using FrequencyDelta = Radio::FrequencyDelta;
|
2014-12-02 19:06:54 -05:00
|
|
|
|
|
|
|
public:
|
2015-06-11 09:36:13 -04:00
|
|
|
explicit Astro(QSettings * settings, Configuration const *, QWidget * parent = nullptr);
|
2014-12-02 19:06:54 -05:00
|
|
|
~Astro ();
|
2015-06-11 09:36:13 -04:00
|
|
|
FrequencyDelta astroUpdate(QDateTime const& t, QString const& mygrid, QString const& hisgrid, Frequency frequency,
|
|
|
|
bool dx_is_self, bool bTx);
|
2015-06-11 20:26:44 -04:00
|
|
|
bool doppler_tracking () const;
|
|
|
|
Q_SIGNAL void doppler_tracking_toggled (bool);
|
2015-06-09 13:39:59 -04:00
|
|
|
|
2014-12-02 19:06:54 -05:00
|
|
|
protected:
|
|
|
|
void closeEvent (QCloseEvent *) override;
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
private slots:
|
|
|
|
void on_rbConstFreqOnMoon_clicked();
|
|
|
|
void on_rbFullTrack_clicked();
|
|
|
|
void on_rbNoDoppler_clicked();
|
|
|
|
void on_rb1Hz_clicked();
|
|
|
|
void on_rb10Hz_clicked();
|
|
|
|
void on_rb100Hz_clicked();
|
2015-05-27 09:08:28 -04:00
|
|
|
void on_cbTxAudioTrack_toggled(bool b);
|
2015-04-22 13:48:03 -04:00
|
|
|
void on_kHzSpinBox_valueChanged(int n);
|
2015-05-27 09:08:28 -04:00
|
|
|
void on_HzSpinBox_valueChanged(int n);
|
2015-04-22 13:48:03 -04:00
|
|
|
|
2014-12-02 19:06:54 -05:00
|
|
|
private:
|
|
|
|
void read_settings ();
|
|
|
|
void write_settings ();
|
|
|
|
|
|
|
|
QSettings * settings_;
|
2015-06-11 09:36:13 -04:00
|
|
|
Configuration const * configuration_;
|
|
|
|
Ui::Astro * ui_;
|
|
|
|
bool m_bRxAudioTrack;
|
|
|
|
bool m_bTxAudioTrack;
|
|
|
|
|
|
|
|
qint32 m_DopplerMethod;
|
|
|
|
qint32 m_kHz;
|
|
|
|
qint32 m_Hz;
|
|
|
|
qint32 m_stepHz;
|
2014-12-02 19:06:54 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
extern "C" {
|
2015-04-22 13:48:03 -04:00
|
|
|
void astrosub_(int* nyear, int* month, int* nday, double* uth, double* freqMoon,
|
2014-12-02 19:06:54 -05:00
|
|
|
const char* mygrid, const char* hisgrid, double* azsun,
|
|
|
|
double* elsun, double* azmoon, double* elmoon, double* azmoondx,
|
|
|
|
double* elmoondx, int* ntsky, int* ndop, int* ndop00,
|
|
|
|
double* ramoon, double* decmoon, double* dgrd, double* poloffset,
|
2015-05-27 09:08:28 -04:00
|
|
|
double* xnr, double* techo, double* width1, double* width2,
|
2015-06-02 11:59:52 -04:00
|
|
|
bool* bTx, const char* AzElFileName, const char* jpleph,
|
|
|
|
int len1, int len2, int len3, int len4);
|
2014-12-02 19:06:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // ASTRO_H
|