2021-02-26 20:25:48 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
2023-11-18 12:12:18 +00:00
|
|
|
// Copyright (C) 2021-2022 Jon Beniston, M7RCE <jon@beniston.com> //
|
2021-02-26 20:25:48 +00:00
|
|
|
// //
|
|
|
|
// This program is free software; you can redistribute it and/or modify //
|
|
|
|
// it under the terms of the GNU General Public License as published by //
|
|
|
|
// the Free Software Foundation as version 3 of the License, or //
|
|
|
|
// (at your option) any later version. //
|
|
|
|
// //
|
|
|
|
// This program is distributed in the hope that it will be useful, //
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
|
|
|
// GNU General Public License V3 for more details. //
|
|
|
|
// //
|
|
|
|
// You should have received a copy of the GNU General Public License //
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef INCLUDE_FEATURE_SATELLITETRACKERREPORT_H_
|
|
|
|
#define INCLUDE_FEATURE_SATELLITETRACKERREPORT_H_
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
#include "util/message.h"
|
|
|
|
#include "satellitetrackersgp4.h"
|
|
|
|
|
|
|
|
class SatelliteTrackerReport : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
|
|
|
|
// Sent from worker to GUI to give latest satellite data
|
|
|
|
class MsgReportSat : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
SatelliteState* getSatelliteState() const { return m_satState; }
|
|
|
|
|
|
|
|
static MsgReportSat* create(SatelliteState* satState)
|
|
|
|
{
|
|
|
|
return new MsgReportSat(satState);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
SatelliteState* m_satState;
|
|
|
|
|
|
|
|
MsgReportSat(SatelliteState* satState) :
|
|
|
|
Message(),
|
|
|
|
m_satState(satState)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
// Sent from worker to GUI to indicate AOS
|
|
|
|
class MsgReportAOS : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
QString getName() const { return m_name; }
|
2022-09-29 15:50:04 +00:00
|
|
|
QString getSpeech() const { return m_speech; }
|
2021-02-26 20:25:48 +00:00
|
|
|
|
2022-09-29 15:50:04 +00:00
|
|
|
static MsgReportAOS* create(const QString& name, const QString &speech)
|
2021-02-26 20:25:48 +00:00
|
|
|
{
|
2022-09-29 15:50:04 +00:00
|
|
|
return new MsgReportAOS(name, speech);
|
2021-02-26 20:25:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString m_name;
|
2022-09-29 15:50:04 +00:00
|
|
|
QString m_speech;
|
2021-02-26 20:25:48 +00:00
|
|
|
|
2022-09-29 15:50:04 +00:00
|
|
|
MsgReportAOS(const QString& name, const QString &speech) :
|
2021-02-26 20:25:48 +00:00
|
|
|
Message(),
|
|
|
|
m_name(name),
|
2022-09-29 15:50:04 +00:00
|
|
|
m_speech(speech)
|
2021-02-26 20:25:48 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-07-10 20:37:52 +00:00
|
|
|
// Sent from worker to GUI to indicate LOS
|
2021-02-26 20:25:48 +00:00
|
|
|
class MsgReportLOS : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
QString getName() const { return m_name; }
|
2022-09-29 15:50:04 +00:00
|
|
|
QString getSpeech() const { return m_speech; }
|
2021-02-26 20:25:48 +00:00
|
|
|
|
2022-09-29 15:50:04 +00:00
|
|
|
static MsgReportLOS* create(const QString& name, const QString &speech)
|
2021-02-26 20:25:48 +00:00
|
|
|
{
|
2022-09-29 15:50:04 +00:00
|
|
|
return new MsgReportLOS(name, speech);
|
2021-02-26 20:25:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString m_name;
|
2022-09-29 15:50:04 +00:00
|
|
|
QString m_speech;
|
2021-02-26 20:25:48 +00:00
|
|
|
|
2022-09-29 15:50:04 +00:00
|
|
|
MsgReportLOS(const QString& name, const QString &speech) :
|
2021-02-26 20:25:48 +00:00
|
|
|
Message(),
|
2022-09-29 15:50:04 +00:00
|
|
|
m_name(name),
|
|
|
|
m_speech(speech)
|
2021-02-26 20:25:48 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
// Sent from worker to GUI, to indicate target has changed
|
|
|
|
class MsgReportTarget : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
QString getName() const { return m_name; }
|
|
|
|
|
|
|
|
static MsgReportTarget* create(const QString& name)
|
|
|
|
{
|
|
|
|
return new MsgReportTarget(name);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString m_name;
|
|
|
|
|
|
|
|
MsgReportTarget(const QString& name) :
|
|
|
|
Message(),
|
|
|
|
m_name(name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
|
|
|
SatelliteTrackerReport() {}
|
|
|
|
~SatelliteTrackerReport() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDE_FEATURE_SATELLITETRACKERREPORT_H_
|