Plot Sun and Moon on sky temperature chart. Plot markers on Galactic line-of-sight chart. Create animations from Galactic line-of-sight chart. Allow weather at antenna location to be downloaded from openweathermap.org Allow target to be entered as Galactic longitude / latitude. Add azimuth and elevation offsets to support scans around targets. Add S7, S8 and S9 targets. Refactor some code from GUI to main plugin, so computed values can be used in other plugins.chirpmodem-v8.0.0
|
After Width: | Height: | Size: 490 B |
|
After Width: | Height: | Size: 642 B |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 804 B |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 2.8 MiB |
|
After Width: | Height: | Size: 403 B |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
<RCC> |
||||
<qresource prefix="/startracker/"> |
||||
<file>startracker/1420mhz_ra_dec.fits</file> |
||||
</qresource> |
||||
</RCC> |
||||
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
<RCC> |
||||
<qresource prefix="/startracker/"> |
||||
<file>startracker/150mhz_ra_dec.fits</file> |
||||
</qresource> |
||||
</RCC> |
||||
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
<RCC> |
||||
<qresource prefix="/startracker/"> |
||||
<file>startracker/408mhz_ra_dec.fits</file> |
||||
</qresource> |
||||
</RCC> |
||||
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
<RCC> |
||||
<qresource prefix="/startracker/"> |
||||
<file>startracker/408mhz_ra_dec_spectral_index.fits</file> |
||||
</qresource> |
||||
</RCC> |
||||
@ -0,0 +1,311 @@
@@ -0,0 +1,311 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 Jon Beniston, M7RCE //
|
||||
// //
|
||||
// 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/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "png.h" |
||||
|
||||
#include <QDebug> |
||||
#include <QString> |
||||
#include <QBuffer> |
||||
#include <QFile> |
||||
|
||||
PNG::PNG() |
||||
{ |
||||
} |
||||
|
||||
PNG::PNG(QByteArray data) : |
||||
m_bytes(data), |
||||
m_width(0), |
||||
m_height(0) |
||||
{ |
||||
int idx = findChunk("IHDR"); |
||||
if (idx >= 0) |
||||
{ |
||||
m_width = getInt(idx + 8); |
||||
m_height = getInt(idx + 12); |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "PNG: No IHDR found"; |
||||
} |
||||
} |
||||
|
||||
void PNG::appendSignature() |
||||
{ |
||||
m_bytes.append(m_signature); |
||||
} |
||||
|
||||
void PNG::appendEnd() |
||||
{ |
||||
QByteArray ba; |
||||
appendChunk("IEND", ba); |
||||
} |
||||
|
||||
void PNG::appendChunk(const char *type, QByteArray chunk) |
||||
{ |
||||
appendInt(chunk.size()); |
||||
appendInt(typeStringToInt(type)); |
||||
m_bytes.append(chunk); |
||||
appendInt(crc(type, chunk)); // CRC type and data, but not length
|
||||
} |
||||
|
||||
void PNG::append(QByteArray data) |
||||
{ |
||||
m_bytes.append(data); |
||||
} |
||||
|
||||
void PNG::appendInt(QByteArray& ba, quint32 value) |
||||
{ |
||||
// Network byte order
|
||||
ba.append((value >> 24) & 0xff); |
||||
ba.append((value >> 16) & 0xff); |
||||
ba.append((value >> 8) & 0xff); |
||||
ba.append((value) & 0xff); |
||||
} |
||||
|
||||
void PNG::appendShort(QByteArray& ba, quint16 value) |
||||
{ |
||||
// Network byte order
|
||||
ba.append((value >> 8) & 0xff); |
||||
ba.append((value) & 0xff); |
||||
} |
||||
|
||||
void PNG::appendInt(quint32 value) |
||||
{ |
||||
appendInt(m_bytes, value); |
||||
} |
||||
|
||||
qint32 PNG::getInt(int index) |
||||
{ |
||||
qint32 v = 0; |
||||
for (int i = 0; i < 4; i++) { |
||||
v |= (m_bytes[index+i] & 0xff) << ((3-i)*8); |
||||
} |
||||
return v; |
||||
} |
||||
|
||||
qint32 PNG::crc(const char *type, const QByteArray data) |
||||
{ |
||||
m_crc.init(); |
||||
m_crc.calculate((const uint8_t *)type, 4); |
||||
m_crc.calculate((const uint8_t *)data.data(), data.size()); |
||||
return m_crc.get(); |
||||
} |
||||
|
||||
qint32 PNG::typeStringToInt(const char *header) |
||||
{ |
||||
quint32 v = 0; |
||||
for (int i = 0; i < 4; i++) { |
||||
v |= header[i] << ((3-i)*8); |
||||
} |
||||
return v; |
||||
} |
||||
|
||||
QString PNG::intToTypeString(quint32 type) |
||||
{ |
||||
QString s; |
||||
for (int i = 0; i < 4; i++) |
||||
{ |
||||
char c = (type >> ((3-i)*8)) & 0xff; |
||||
s.append(c); |
||||
} |
||||
return s; |
||||
} |
||||
|
||||
// Animation control chunk for APNGs (loops=0 is infinite)
|
||||
void PNG::appendacTL(int frames, quint32 loops) |
||||
{ |
||||
QByteArray ba; |
||||
appendInt(ba, frames); |
||||
appendInt(ba, loops); |
||||
appendChunk("acTL", ba); |
||||
} |
||||
|
||||
// Frame control chunk for APNGs
|
||||
void PNG::appendfcTL(quint32 seqNo, quint32 width, quint32 height, int fps, quint32 xOffset, quint32 yOffset) |
||||
{ |
||||
QByteArray ba; |
||||
appendInt(ba, seqNo); |
||||
appendInt(ba, width); |
||||
appendInt(ba, height); |
||||
appendInt(ba, xOffset); |
||||
appendInt(ba, yOffset); |
||||
appendShort(ba, 1); |
||||
appendShort(ba, fps); |
||||
ba.append((char)0); // No disposal
|
||||
ba.append((char)0); // Overwrite previous image
|
||||
appendChunk("fcTL", ba); |
||||
} |
||||
|
||||
// Animation frame data
|
||||
void PNG::appendfdAT(quint32 seqNo, const QByteArray& data) |
||||
{ |
||||
QByteArray ba; |
||||
appendInt(ba, seqNo); |
||||
ba.append(data); |
||||
appendChunk("fdAT", ba); |
||||
} |
||||
|
||||
QByteArray PNG::data() |
||||
{ |
||||
return m_bytes; |
||||
} |
||||
|
||||
bool PNG::checkSignature() |
||||
{ |
||||
return m_bytes.startsWith(m_signature); |
||||
} |
||||
|
||||
int PNG::findChunk(const char *type, int startIndex) |
||||
{ |
||||
if ((startIndex == 0) && !checkSignature()) |
||||
{ |
||||
qDebug() << "PNG::findChunk - PNG signature not found"; |
||||
return -1; |
||||
} |
||||
int i = startIndex == 0 ? m_signature.size() : startIndex; |
||||
qint32 typeInt = typeStringToInt(type); |
||||
while (i < m_bytes.size()) |
||||
{ |
||||
qint32 chunkType = getInt(i+4); |
||||
if (typeInt == chunkType) { |
||||
return i; |
||||
} |
||||
qint32 length = getInt(i); |
||||
i += 12 + length; |
||||
} |
||||
return -1; |
||||
} |
||||
|
||||
// Get chunk including length, type data and CRC
|
||||
QByteArray PNG::getChunk(const char *type) |
||||
{ |
||||
int start = findChunk(type); |
||||
if (start >= 0) |
||||
{ |
||||
quint32 length = getInt(start); |
||||
return m_bytes.mid(start, length + 12); |
||||
} |
||||
return QByteArray(); |
||||
} |
||||
|
||||
// Get all chunks with same type
|
||||
QByteArray PNG::getChunks(const char *type) |
||||
{ |
||||
int start = 0; |
||||
QByteArray bytes; |
||||
|
||||
while ((start = findChunk(type, start)) != -1) |
||||
{ |
||||
quint32 length = getInt(start); |
||||
QByteArray chunk = m_bytes.mid(start, length + 12); |
||||
bytes.append(chunk); |
||||
start += chunk.size(); |
||||
} |
||||
return bytes; |
||||
} |
||||
|
||||
// Get data from chunk
|
||||
QList<QByteArray> PNG::getChunkData(const char *type) |
||||
{ |
||||
int start = 0; |
||||
QList<QByteArray> chunks; |
||||
|
||||
while ((start = findChunk(type, start)) != -1) |
||||
{ |
||||
quint32 length = getInt(start); |
||||
QByteArray chunk = m_bytes.mid(start + 8, length); |
||||
chunks.append(chunk); |
||||
start += length + 12; |
||||
} |
||||
|
||||
return chunks; |
||||
} |
||||
|
||||
quint32 PNG::getWidth() const |
||||
{ |
||||
return m_width; |
||||
} |
||||
|
||||
quint32 PNG::getHeight() const |
||||
{ |
||||
return m_height; |
||||
} |
||||
|
||||
bool APNG::addImage(const QImage& image, int fps) |
||||
{ |
||||
if (!m_ended) |
||||
{ |
||||
QByteArray ba; |
||||
QBuffer buffer(&ba); |
||||
buffer.open(QIODevice::ReadWrite); |
||||
if (image.save(&buffer, "PNG")) |
||||
{ |
||||
PNG pngIn(ba); |
||||
if (m_frame == 0) |
||||
{ |
||||
m_png.append(pngIn.getChunk("IHDR")); |
||||
m_png.appendacTL(m_frames); |
||||
m_png.appendfcTL(m_seqNo++, pngIn.getWidth(), pngIn.getHeight(), fps); |
||||
// PNGs can contain multiple IDAT chunks, typically each limited to 8kB
|
||||
m_png.append(pngIn.getChunks("IDAT")); |
||||
} |
||||
else |
||||
{ |
||||
m_png.appendfcTL(m_seqNo++, pngIn.getWidth(), pngIn.getHeight(), fps); |
||||
QList<QByteArray> data = pngIn.getChunkData("IDAT"); |
||||
for (int i = 0; i < data.size(); i++) { |
||||
m_png.appendfdAT(m_seqNo++, data[i]); |
||||
} |
||||
} |
||||
m_frame++; |
||||
return true; |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "APNG::addImage - Failed to save image to PNG"; |
||||
return false; |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "APNG::addImage - Call to addImage after IEND added"; |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
bool APNG::save(const QString& fileName) |
||||
{ |
||||
if (!m_ended) |
||||
{ |
||||
if (m_frame != m_frames) { |
||||
qDebug() << "APNG::save - " << m_frame << " frames added out of expected " << m_frames; |
||||
} |
||||
m_png.appendEnd(); |
||||
m_ended = true; |
||||
} |
||||
QFile animFile(fileName); |
||||
if (animFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) |
||||
{ |
||||
animFile.write(m_png.data()); |
||||
animFile.close(); |
||||
return true; |
||||
} |
||||
else |
||||
{ |
||||
return false; |
||||
} |
||||
} |
||||
@ -0,0 +1,96 @@
@@ -0,0 +1,96 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 Jon Beniston, M7RCE //
|
||||
// //
|
||||
// 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_PNG_H |
||||
#define INCLUDE_PNG_H |
||||
|
||||
#include <QByteArray> |
||||
#include <QImage> |
||||
|
||||
#include "export.h" |
||||
|
||||
#include "util/crc.h" |
||||
|
||||
// PNG (Portable Network Graphics) utility code
|
||||
// Contains just enough functionality to support assembling APNG files (Animated PNGs)
|
||||
// from multiple PNGs (which can be created using Qt)
|
||||
class SDRBASE_API PNG { |
||||
public: |
||||
|
||||
PNG(); |
||||
PNG(QByteArray data); |
||||
void appendSignature(); |
||||
void appendEnd(); |
||||
void appendChunk(const char *type, QByteArray chunk); |
||||
void append(QByteArray data); |
||||
void appendInt(QByteArray& ba, quint32 value); |
||||
void appendShort(QByteArray& ba, quint16 value); |
||||
void appendInt(quint32 value); |
||||
qint32 getInt(int index); |
||||
qint32 crc(const char *type, const QByteArray data); |
||||
qint32 typeStringToInt(const char *header); |
||||
QString intToTypeString(quint32 type); |
||||
void appendacTL(int frames, quint32 loops=0); |
||||
void appendfcTL(quint32 seqNo, quint32 width, quint32 height, int fps, quint32 xOffset=0, quint32 yOffset=0); |
||||
void appendfdAT(quint32 seqNo, const QByteArray& data); |
||||
QByteArray data(); |
||||
bool checkSignature(); |
||||
int findChunk(const char *type, int startIndex=0); |
||||
QByteArray getChunk(const char *type); |
||||
QByteArray getChunks(const char *type); |
||||
QList<QByteArray> getChunkData(const char *type); |
||||
quint32 getWidth() const; |
||||
quint32 getHeight() const; |
||||
|
||||
private: |
||||
|
||||
QByteArray m_signature = QByteArrayLiteral("\x89\x50\x4e\x47\x0d\x0a\x1a\x0a"); |
||||
QByteArray m_bytes; |
||||
crc32 m_crc; |
||||
quint32 m_width; |
||||
quint32 m_height; |
||||
|
||||
}; |
||||
|
||||
// Animated PNG
|
||||
class SDRBASE_API APNG { |
||||
|
||||
public: |
||||
|
||||
APNG(int frames) : |
||||
m_frames(frames), |
||||
m_frame(0), |
||||
m_seqNo(0), |
||||
m_ended(false) |
||||
{ |
||||
m_png.appendSignature(); |
||||
} |
||||
|
||||
bool addImage(const QImage& image, int fps=5); |
||||
bool save(const QString& fileName); |
||||
|
||||
private: |
||||
|
||||
PNG m_png; |
||||
int m_frames; //!< Total number of frames in animation
|
||||
int m_frame; //!< Current frame number
|
||||
int m_seqNo; //!< Chunk sequence number
|
||||
bool m_ended; //!< IEND chunk has added
|
||||
|
||||
}; |
||||
|
||||
#endif // INCLUDE_PNG_H
|
||||
@ -0,0 +1,140 @@
@@ -0,0 +1,140 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 Jon Beniston, M7RCE //
|
||||
// //
|
||||
// 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/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "weather.h" |
||||
|
||||
#include <QDebug> |
||||
#include <QUrl> |
||||
#include <QUrlQuery> |
||||
#include <QNetworkReply> |
||||
#include <QJsonDocument> |
||||
#include <QJsonObject> |
||||
|
||||
Weather::Weather() |
||||
{ |
||||
connect(&m_timer, &QTimer::timeout, this, &Weather::update); |
||||
} |
||||
|
||||
Weather* Weather::create(const QString& apiKey, const QString& service) |
||||
{ |
||||
if (service == "openweathermap.org") |
||||
{ |
||||
if (!apiKey.isEmpty()) |
||||
{ |
||||
return new OpenWeatherMap(apiKey); |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "Weather::connect: An API key is required for: " << service; |
||||
return nullptr; |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "Weather::connect: Unsupported service: " << service; |
||||
return nullptr; |
||||
} |
||||
} |
||||
|
||||
void Weather::getWeatherPeriodically(float latitude, float longitude, int periodInMins) |
||||
{ |
||||
m_latitude = latitude; |
||||
m_longitude = longitude; |
||||
m_timer.setInterval(periodInMins*60*1000); |
||||
m_timer.start(); |
||||
update(); |
||||
} |
||||
|
||||
void Weather::update() |
||||
{ |
||||
getWeather(m_latitude, m_longitude); |
||||
} |
||||
|
||||
OpenWeatherMap::OpenWeatherMap(const QString& apiKey) : |
||||
m_apiKey(apiKey) |
||||
{ |
||||
m_networkManager = new QNetworkAccessManager(); |
||||
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(handleReply(QNetworkReply*))); |
||||
} |
||||
|
||||
OpenWeatherMap::~OpenWeatherMap() |
||||
{ |
||||
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(handleReply(QNetworkReply*))); |
||||
delete m_networkManager; |
||||
} |
||||
|
||||
void OpenWeatherMap::getWeather(float latitude, float longitude) |
||||
{ |
||||
QUrl url(QString("http://api.openweathermap.org/data/2.5/weather")); |
||||
QUrlQuery query; |
||||
query.addQueryItem("lat", QString::number(latitude)); |
||||
query.addQueryItem("lon", QString::number(longitude)); |
||||
query.addQueryItem("mode", "json"); |
||||
query.addQueryItem("units", "metric"); |
||||
query.addQueryItem("appid", m_apiKey); |
||||
url.setQuery(query); |
||||
|
||||
QNetworkReply *reply = m_networkManager->get(QNetworkRequest(url)); |
||||
} |
||||
|
||||
void OpenWeatherMap::handleReply(QNetworkReply* reply) |
||||
{ |
||||
if (reply) |
||||
{ |
||||
if (!reply->error()) |
||||
{ |
||||
QJsonDocument document = QJsonDocument::fromJson(reply->readAll()); |
||||
if (document.isObject()) |
||||
{ |
||||
QJsonObject obj = document.object(); |
||||
if (obj.contains(QStringLiteral("main"))) |
||||
{ |
||||
QJsonValue val = obj.value(QStringLiteral("main")); |
||||
QJsonObject mainObj = val.toObject(); |
||||
float temp = NAN, pressure = NAN, humidity = NAN; |
||||
if (mainObj.contains(QStringLiteral("temp"))) { |
||||
temp = mainObj.value(QStringLiteral("temp")).toDouble(); |
||||
} |
||||
if (mainObj.contains(QStringLiteral("pressure"))) { |
||||
pressure = mainObj.value(QStringLiteral("pressure")).toDouble(); |
||||
} |
||||
if (mainObj.contains(QStringLiteral("humidity"))) { |
||||
humidity = mainObj.value(QStringLiteral("humidity")).toDouble(); |
||||
} |
||||
emit weatherUpdated(temp, pressure, humidity); |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "OpenWeatherMap::handleReply: Object doesn't contain a main: " << obj; |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "OpenWeatherMap::handleReply: Document is not an object: " << document; |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "OpenWeatherMap::handleReply: error: " << reply->error(); |
||||
} |
||||
reply->deleteLater(); |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "OpenWeatherMap::handleReply: reply is null"; |
||||
} |
||||
} |
||||
@ -0,0 +1,76 @@
@@ -0,0 +1,76 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 Jon Beniston, M7RCE //
|
||||
// //
|
||||
// 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_WEATHER_H |
||||
#define INCLUDE_WEATHER_H |
||||
|
||||
#include <QtCore> |
||||
#include <QTimer> |
||||
|
||||
#include "export.h" |
||||
|
||||
class QNetworkAccessManager; |
||||
class QNetworkReply; |
||||
|
||||
// Weather API wrapper
|
||||
// Allows temperature, pressure and humidity to be obtained for a given latitude and longitude
|
||||
// Currently supports openweathermap.org
|
||||
class SDRBASE_API Weather : public QObject |
||||
{ |
||||
Q_OBJECT |
||||
protected: |
||||
Weather(); |
||||
|
||||
public: |
||||
static Weather* create(const QString& apiKey, const QString& service="openweathermap.org"); |
||||
|
||||
virtual void getWeather(float latitude, float longitude) = 0; |
||||
void getWeatherPeriodically(float latitude, float longitude, int periodInMins); |
||||
|
||||
public slots: |
||||
void update(); |
||||
|
||||
signals: |
||||
void weatherUpdated(float temperature, float pressure, float humidity); // Called when new data available. If no value is available, parameter will be NAN
|
||||
|
||||
private: |
||||
QTimer m_timer; // Timer for periodic updates
|
||||
float m_latitude; // Saved latitude for periodic updates
|
||||
float m_longitude; // Saved longitude for periodic updates
|
||||
|
||||
}; |
||||
|
||||
class SDRBASE_API OpenWeatherMap : public Weather { |
||||
Q_OBJECT |
||||
public: |
||||
|
||||
OpenWeatherMap(const QString& apiKey); |
||||
~OpenWeatherMap(); |
||||
virtual void getWeather(float latitude, float longitude) override; |
||||
|
||||
private: |
||||
|
||||
QString m_apiKey; |
||||
QNetworkAccessManager *m_networkManager; |
||||
|
||||
|
||||
public slots: |
||||
void handleReply(QNetworkReply* reply); |
||||
|
||||
}; |
||||
|
||||
#endif /* INCLUDE_WEATHER_H */ |
||||
@ -0,0 +1,179 @@
@@ -0,0 +1,179 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
|
||||
#include "SWGStarTrackerDisplayLoSSettings.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGStarTrackerDisplayLoSSettings::SWGStarTrackerDisplayLoSSettings(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGStarTrackerDisplayLoSSettings::SWGStarTrackerDisplayLoSSettings() { |
||||
name = nullptr; |
||||
m_name_isSet = false; |
||||
b = 0.0f; |
||||
m_b_isSet = false; |
||||
l = 0.0f; |
||||
m_l_isSet = false; |
||||
d = 0.0f; |
||||
m_d_isSet = false; |
||||
} |
||||
|
||||
SWGStarTrackerDisplayLoSSettings::~SWGStarTrackerDisplayLoSSettings() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplayLoSSettings::init() { |
||||
name = new QString(""); |
||||
m_name_isSet = false; |
||||
b = 0.0f; |
||||
m_b_isSet = false; |
||||
l = 0.0f; |
||||
m_l_isSet = false; |
||||
d = 0.0f; |
||||
m_d_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplayLoSSettings::cleanup() { |
||||
if(name != nullptr) {
|
||||
delete name; |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
SWGStarTrackerDisplayLoSSettings* |
||||
SWGStarTrackerDisplayLoSSettings::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplayLoSSettings::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&b, pJson["b"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&l, pJson["l"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&d, pJson["d"], "float", ""); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGStarTrackerDisplayLoSSettings::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGStarTrackerDisplayLoSSettings::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(name != nullptr && *name != QString("")){ |
||||
toJsonValue(QString("name"), name, obj, QString("QString")); |
||||
} |
||||
if(m_b_isSet){ |
||||
obj->insert("b", QJsonValue(b)); |
||||
} |
||||
if(m_l_isSet){ |
||||
obj->insert("l", QJsonValue(l)); |
||||
} |
||||
if(m_d_isSet){ |
||||
obj->insert("d", QJsonValue(d)); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGStarTrackerDisplayLoSSettings::getName() { |
||||
return name; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplayLoSSettings::setName(QString* name) { |
||||
this->name = name; |
||||
this->m_name_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerDisplayLoSSettings::getB() { |
||||
return b; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplayLoSSettings::setB(float b) { |
||||
this->b = b; |
||||
this->m_b_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerDisplayLoSSettings::getL() { |
||||
return l; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplayLoSSettings::setL(float l) { |
||||
this->l = l; |
||||
this->m_l_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerDisplayLoSSettings::getD() { |
||||
return d; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplayLoSSettings::setD(float d) { |
||||
this->d = d; |
||||
this->m_d_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGStarTrackerDisplayLoSSettings::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(name && *name != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_b_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_l_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_d_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,77 @@
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGStarTrackerDisplayLoSSettings.h |
||||
* |
||||
* Details of object to display in Star Tracker line-of-sight view. Can be sent by other plugins to startracker.display message queue |
||||
*/ |
||||
|
||||
#ifndef SWGStarTrackerDisplayLoSSettings_H_ |
||||
#define SWGStarTrackerDisplayLoSSettings_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGStarTrackerDisplayLoSSettings: public SWGObject { |
||||
public: |
||||
SWGStarTrackerDisplayLoSSettings(); |
||||
SWGStarTrackerDisplayLoSSettings(QString* json); |
||||
virtual ~SWGStarTrackerDisplayLoSSettings(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGStarTrackerDisplayLoSSettings* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getName(); |
||||
void setName(QString* name); |
||||
|
||||
float getB(); |
||||
void setB(float b); |
||||
|
||||
float getL(); |
||||
void setL(float l); |
||||
|
||||
float getD(); |
||||
void setD(float d); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* name; |
||||
bool m_name_isSet; |
||||
|
||||
float b; |
||||
bool m_b_isSet; |
||||
|
||||
float l; |
||||
bool m_l_isSet; |
||||
|
||||
float d; |
||||
bool m_d_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGStarTrackerDisplayLoSSettings_H_ */ |
||||
@ -0,0 +1,179 @@
@@ -0,0 +1,179 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
|
||||
#include "SWGStarTrackerDisplayLoSSettings_2.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGStarTrackerDisplayLoSSettings_2::SWGStarTrackerDisplayLoSSettings_2(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGStarTrackerDisplayLoSSettings_2::SWGStarTrackerDisplayLoSSettings_2() { |
||||
name = nullptr; |
||||
m_name_isSet = false; |
||||
b = 0.0f; |
||||
m_b_isSet = false; |
||||
l = 0.0f; |
||||
m_l_isSet = false; |
||||
d = 0.0f; |
||||
m_d_isSet = false; |
||||
} |
||||
|
||||
SWGStarTrackerDisplayLoSSettings_2::~SWGStarTrackerDisplayLoSSettings_2() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplayLoSSettings_2::init() { |
||||
name = new QString(""); |
||||
m_name_isSet = false; |
||||
b = 0.0f; |
||||
m_b_isSet = false; |
||||
l = 0.0f; |
||||
m_l_isSet = false; |
||||
d = 0.0f; |
||||
m_d_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplayLoSSettings_2::cleanup() { |
||||
if(name != nullptr) {
|
||||
delete name; |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
SWGStarTrackerDisplayLoSSettings_2* |
||||
SWGStarTrackerDisplayLoSSettings_2::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplayLoSSettings_2::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&b, pJson["b"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&l, pJson["l"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&d, pJson["d"], "float", ""); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGStarTrackerDisplayLoSSettings_2::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGStarTrackerDisplayLoSSettings_2::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(name != nullptr && *name != QString("")){ |
||||
toJsonValue(QString("name"), name, obj, QString("QString")); |
||||
} |
||||
if(m_b_isSet){ |
||||
obj->insert("b", QJsonValue(b)); |
||||
} |
||||
if(m_l_isSet){ |
||||
obj->insert("l", QJsonValue(l)); |
||||
} |
||||
if(m_d_isSet){ |
||||
obj->insert("d", QJsonValue(d)); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGStarTrackerDisplayLoSSettings_2::getName() { |
||||
return name; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplayLoSSettings_2::setName(QString* name) { |
||||
this->name = name; |
||||
this->m_name_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerDisplayLoSSettings_2::getB() { |
||||
return b; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplayLoSSettings_2::setB(float b) { |
||||
this->b = b; |
||||
this->m_b_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerDisplayLoSSettings_2::getL() { |
||||
return l; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplayLoSSettings_2::setL(float l) { |
||||
this->l = l; |
||||
this->m_l_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerDisplayLoSSettings_2::getD() { |
||||
return d; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplayLoSSettings_2::setD(float d) { |
||||
this->d = d; |
||||
this->m_d_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGStarTrackerDisplayLoSSettings_2::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(name && *name != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_b_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_l_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_d_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,77 @@
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGStarTrackerDisplayLoSSettings_2.h |
||||
* |
||||
* Details of object to display in Star Tracker line-of-sight view. Can be sent by other plugins to startracker.display message queue |
||||
*/ |
||||
|
||||
#ifndef SWGStarTrackerDisplayLoSSettings_2_H_ |
||||
#define SWGStarTrackerDisplayLoSSettings_2_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGStarTrackerDisplayLoSSettings_2: public SWGObject { |
||||
public: |
||||
SWGStarTrackerDisplayLoSSettings_2(); |
||||
SWGStarTrackerDisplayLoSSettings_2(QString* json); |
||||
virtual ~SWGStarTrackerDisplayLoSSettings_2(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGStarTrackerDisplayLoSSettings_2* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getName(); |
||||
void setName(QString* name); |
||||
|
||||
float getB(); |
||||
void setB(float b); |
||||
|
||||
float getL(); |
||||
void setL(float l); |
||||
|
||||
float getD(); |
||||
void setD(float d); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* name; |
||||
bool m_name_isSet; |
||||
|
||||
float b; |
||||
bool m_b_isSet; |
||||
|
||||
float l; |
||||
bool m_l_isSet; |
||||
|
||||
float d; |
||||
bool m_d_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGStarTrackerDisplayLoSSettings_2_H_ */ |
||||
@ -0,0 +1,156 @@
@@ -0,0 +1,156 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
|
||||
#include "SWGStarTrackerDisplaySettings.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGStarTrackerDisplaySettings::SWGStarTrackerDisplaySettings(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGStarTrackerDisplaySettings::SWGStarTrackerDisplaySettings() { |
||||
date_time = nullptr; |
||||
m_date_time_isSet = false; |
||||
azimuth = 0.0f; |
||||
m_azimuth_isSet = false; |
||||
elevation = 0.0f; |
||||
m_elevation_isSet = false; |
||||
} |
||||
|
||||
SWGStarTrackerDisplaySettings::~SWGStarTrackerDisplaySettings() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplaySettings::init() { |
||||
date_time = new QString(""); |
||||
m_date_time_isSet = false; |
||||
azimuth = 0.0f; |
||||
m_azimuth_isSet = false; |
||||
elevation = 0.0f; |
||||
m_elevation_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplaySettings::cleanup() { |
||||
if(date_time != nullptr) {
|
||||
delete date_time; |
||||
} |
||||
|
||||
|
||||
} |
||||
|
||||
SWGStarTrackerDisplaySettings* |
||||
SWGStarTrackerDisplaySettings::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplaySettings::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&date_time, pJson["dateTime"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&azimuth, pJson["azimuth"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&elevation, pJson["elevation"], "float", ""); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGStarTrackerDisplaySettings::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGStarTrackerDisplaySettings::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(date_time != nullptr && *date_time != QString("")){ |
||||
toJsonValue(QString("dateTime"), date_time, obj, QString("QString")); |
||||
} |
||||
if(m_azimuth_isSet){ |
||||
obj->insert("azimuth", QJsonValue(azimuth)); |
||||
} |
||||
if(m_elevation_isSet){ |
||||
obj->insert("elevation", QJsonValue(elevation)); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGStarTrackerDisplaySettings::getDateTime() { |
||||
return date_time; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplaySettings::setDateTime(QString* date_time) { |
||||
this->date_time = date_time; |
||||
this->m_date_time_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerDisplaySettings::getAzimuth() { |
||||
return azimuth; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplaySettings::setAzimuth(float azimuth) { |
||||
this->azimuth = azimuth; |
||||
this->m_azimuth_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerDisplaySettings::getElevation() { |
||||
return elevation; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplaySettings::setElevation(float elevation) { |
||||
this->elevation = elevation; |
||||
this->m_elevation_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGStarTrackerDisplaySettings::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(date_time && *date_time != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_azimuth_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_elevation_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,71 @@
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGStarTrackerDisplaySettings.h |
||||
* |
||||
* Settings to display in Star Tracker. Can be sent by other plugins to startracker.display message queue. |
||||
*/ |
||||
|
||||
#ifndef SWGStarTrackerDisplaySettings_H_ |
||||
#define SWGStarTrackerDisplaySettings_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGStarTrackerDisplaySettings: public SWGObject { |
||||
public: |
||||
SWGStarTrackerDisplaySettings(); |
||||
SWGStarTrackerDisplaySettings(QString* json); |
||||
virtual ~SWGStarTrackerDisplaySettings(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGStarTrackerDisplaySettings* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getDateTime(); |
||||
void setDateTime(QString* date_time); |
||||
|
||||
float getAzimuth(); |
||||
void setAzimuth(float azimuth); |
||||
|
||||
float getElevation(); |
||||
void setElevation(float elevation); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* date_time; |
||||
bool m_date_time_isSet; |
||||
|
||||
float azimuth; |
||||
bool m_azimuth_isSet; |
||||
|
||||
float elevation; |
||||
bool m_elevation_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGStarTrackerDisplaySettings_H_ */ |
||||
@ -0,0 +1,156 @@
@@ -0,0 +1,156 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
|
||||
#include "SWGStarTrackerDisplaySettings_2.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGStarTrackerDisplaySettings_2::SWGStarTrackerDisplaySettings_2(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGStarTrackerDisplaySettings_2::SWGStarTrackerDisplaySettings_2() { |
||||
date_time = nullptr; |
||||
m_date_time_isSet = false; |
||||
azimuth = 0.0f; |
||||
m_azimuth_isSet = false; |
||||
elevation = 0.0f; |
||||
m_elevation_isSet = false; |
||||
} |
||||
|
||||
SWGStarTrackerDisplaySettings_2::~SWGStarTrackerDisplaySettings_2() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplaySettings_2::init() { |
||||
date_time = new QString(""); |
||||
m_date_time_isSet = false; |
||||
azimuth = 0.0f; |
||||
m_azimuth_isSet = false; |
||||
elevation = 0.0f; |
||||
m_elevation_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplaySettings_2::cleanup() { |
||||
if(date_time != nullptr) {
|
||||
delete date_time; |
||||
} |
||||
|
||||
|
||||
} |
||||
|
||||
SWGStarTrackerDisplaySettings_2* |
||||
SWGStarTrackerDisplaySettings_2::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerDisplaySettings_2::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&date_time, pJson["dateTime"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&azimuth, pJson["azimuth"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&elevation, pJson["elevation"], "float", ""); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGStarTrackerDisplaySettings_2::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGStarTrackerDisplaySettings_2::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(date_time != nullptr && *date_time != QString("")){ |
||||
toJsonValue(QString("dateTime"), date_time, obj, QString("QString")); |
||||
} |
||||
if(m_azimuth_isSet){ |
||||
obj->insert("azimuth", QJsonValue(azimuth)); |
||||
} |
||||
if(m_elevation_isSet){ |
||||
obj->insert("elevation", QJsonValue(elevation)); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGStarTrackerDisplaySettings_2::getDateTime() { |
||||
return date_time; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplaySettings_2::setDateTime(QString* date_time) { |
||||
this->date_time = date_time; |
||||
this->m_date_time_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerDisplaySettings_2::getAzimuth() { |
||||
return azimuth; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplaySettings_2::setAzimuth(float azimuth) { |
||||
this->azimuth = azimuth; |
||||
this->m_azimuth_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerDisplaySettings_2::getElevation() { |
||||
return elevation; |
||||
} |
||||
void |
||||
SWGStarTrackerDisplaySettings_2::setElevation(float elevation) { |
||||
this->elevation = elevation; |
||||
this->m_elevation_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGStarTrackerDisplaySettings_2::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(date_time && *date_time != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_azimuth_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_elevation_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,71 @@
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGStarTrackerDisplaySettings_2.h |
||||
* |
||||
* Settings to display in Star Tracker. Can be sent by other plugins to startracker.display message queue. |
||||
*/ |
||||
|
||||
#ifndef SWGStarTrackerDisplaySettings_2_H_ |
||||
#define SWGStarTrackerDisplaySettings_2_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGStarTrackerDisplaySettings_2: public SWGObject { |
||||
public: |
||||
SWGStarTrackerDisplaySettings_2(); |
||||
SWGStarTrackerDisplaySettings_2(QString* json); |
||||
virtual ~SWGStarTrackerDisplaySettings_2(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGStarTrackerDisplaySettings_2* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getDateTime(); |
||||
void setDateTime(QString* date_time); |
||||
|
||||
float getAzimuth(); |
||||
void setAzimuth(float azimuth); |
||||
|
||||
float getElevation(); |
||||
void setElevation(float elevation); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* date_time; |
||||
bool m_date_time_isSet; |
||||
|
||||
float azimuth; |
||||
bool m_azimuth_isSet; |
||||
|
||||
float elevation; |
||||
bool m_elevation_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGStarTrackerDisplaySettings_2_H_ */ |
||||
@ -0,0 +1,409 @@
@@ -0,0 +1,409 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
|
||||
#include "SWGStarTrackerTarget.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGStarTrackerTarget::SWGStarTrackerTarget(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGStarTrackerTarget::SWGStarTrackerTarget() { |
||||
name = nullptr; |
||||
m_name_isSet = false; |
||||
azimuth = 0.0f; |
||||
m_azimuth_isSet = false; |
||||
elevation = 0.0f; |
||||
m_elevation_isSet = false; |
||||
ra = 0.0f; |
||||
m_ra_isSet = false; |
||||
dec = 0.0f; |
||||
m_dec_isSet = false; |
||||
b = 0.0f; |
||||
m_b_isSet = false; |
||||
l = 0.0f; |
||||
m_l_isSet = false; |
||||
earth_rotation_velocity = 0.0f; |
||||
m_earth_rotation_velocity_isSet = false; |
||||
earth_orbit_velocity_bcrs = 0.0f; |
||||
m_earth_orbit_velocity_bcrs_isSet = false; |
||||
sun_velocity_lsr = 0.0f; |
||||
m_sun_velocity_lsr_isSet = false; |
||||
solar_flux = 0.0f; |
||||
m_solar_flux_isSet = false; |
||||
air_temperature = 0.0f; |
||||
m_air_temperature_isSet = false; |
||||
sky_temperature = 0.0f; |
||||
m_sky_temperature_isSet = false; |
||||
hpbw = 0.0f; |
||||
m_hpbw_isSet = false; |
||||
} |
||||
|
||||
SWGStarTrackerTarget::~SWGStarTrackerTarget() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerTarget::init() { |
||||
name = new QString(""); |
||||
m_name_isSet = false; |
||||
azimuth = 0.0f; |
||||
m_azimuth_isSet = false; |
||||
elevation = 0.0f; |
||||
m_elevation_isSet = false; |
||||
ra = 0.0f; |
||||
m_ra_isSet = false; |
||||
dec = 0.0f; |
||||
m_dec_isSet = false; |
||||
b = 0.0f; |
||||
m_b_isSet = false; |
||||
l = 0.0f; |
||||
m_l_isSet = false; |
||||
earth_rotation_velocity = 0.0f; |
||||
m_earth_rotation_velocity_isSet = false; |
||||
earth_orbit_velocity_bcrs = 0.0f; |
||||
m_earth_orbit_velocity_bcrs_isSet = false; |
||||
sun_velocity_lsr = 0.0f; |
||||
m_sun_velocity_lsr_isSet = false; |
||||
solar_flux = 0.0f; |
||||
m_solar_flux_isSet = false; |
||||
air_temperature = 0.0f; |
||||
m_air_temperature_isSet = false; |
||||
sky_temperature = 0.0f; |
||||
m_sky_temperature_isSet = false; |
||||
hpbw = 0.0f; |
||||
m_hpbw_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerTarget::cleanup() { |
||||
if(name != nullptr) {
|
||||
delete name; |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
SWGStarTrackerTarget* |
||||
SWGStarTrackerTarget::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerTarget::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&azimuth, pJson["azimuth"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&elevation, pJson["elevation"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&ra, pJson["ra"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&dec, pJson["dec"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&b, pJson["b"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&l, pJson["l"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&earth_rotation_velocity, pJson["earthRotationVelocity"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&earth_orbit_velocity_bcrs, pJson["earthOrbitVelocityBCRS"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&sun_velocity_lsr, pJson["sunVelocityLSR"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&solar_flux, pJson["solarFlux"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&air_temperature, pJson["airTemperature"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&sky_temperature, pJson["skyTemperature"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&hpbw, pJson["hpbw"], "float", ""); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGStarTrackerTarget::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGStarTrackerTarget::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(name != nullptr && *name != QString("")){ |
||||
toJsonValue(QString("name"), name, obj, QString("QString")); |
||||
} |
||||
if(m_azimuth_isSet){ |
||||
obj->insert("azimuth", QJsonValue(azimuth)); |
||||
} |
||||
if(m_elevation_isSet){ |
||||
obj->insert("elevation", QJsonValue(elevation)); |
||||
} |
||||
if(m_ra_isSet){ |
||||
obj->insert("ra", QJsonValue(ra)); |
||||
} |
||||
if(m_dec_isSet){ |
||||
obj->insert("dec", QJsonValue(dec)); |
||||
} |
||||
if(m_b_isSet){ |
||||
obj->insert("b", QJsonValue(b)); |
||||
} |
||||
if(m_l_isSet){ |
||||
obj->insert("l", QJsonValue(l)); |
||||
} |
||||
if(m_earth_rotation_velocity_isSet){ |
||||
obj->insert("earthRotationVelocity", QJsonValue(earth_rotation_velocity)); |
||||
} |
||||
if(m_earth_orbit_velocity_bcrs_isSet){ |
||||
obj->insert("earthOrbitVelocityBCRS", QJsonValue(earth_orbit_velocity_bcrs)); |
||||
} |
||||
if(m_sun_velocity_lsr_isSet){ |
||||
obj->insert("sunVelocityLSR", QJsonValue(sun_velocity_lsr)); |
||||
} |
||||
if(m_solar_flux_isSet){ |
||||
obj->insert("solarFlux", QJsonValue(solar_flux)); |
||||
} |
||||
if(m_air_temperature_isSet){ |
||||
obj->insert("airTemperature", QJsonValue(air_temperature)); |
||||
} |
||||
if(m_sky_temperature_isSet){ |
||||
obj->insert("skyTemperature", QJsonValue(sky_temperature)); |
||||
} |
||||
if(m_hpbw_isSet){ |
||||
obj->insert("hpbw", QJsonValue(hpbw)); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGStarTrackerTarget::getName() { |
||||
return name; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setName(QString* name) { |
||||
this->name = name; |
||||
this->m_name_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getAzimuth() { |
||||
return azimuth; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setAzimuth(float azimuth) { |
||||
this->azimuth = azimuth; |
||||
this->m_azimuth_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getElevation() { |
||||
return elevation; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setElevation(float elevation) { |
||||
this->elevation = elevation; |
||||
this->m_elevation_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getRa() { |
||||
return ra; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setRa(float ra) { |
||||
this->ra = ra; |
||||
this->m_ra_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getDec() { |
||||
return dec; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setDec(float dec) { |
||||
this->dec = dec; |
||||
this->m_dec_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getB() { |
||||
return b; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setB(float b) { |
||||
this->b = b; |
||||
this->m_b_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getL() { |
||||
return l; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setL(float l) { |
||||
this->l = l; |
||||
this->m_l_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getEarthRotationVelocity() { |
||||
return earth_rotation_velocity; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setEarthRotationVelocity(float earth_rotation_velocity) { |
||||
this->earth_rotation_velocity = earth_rotation_velocity; |
||||
this->m_earth_rotation_velocity_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getEarthOrbitVelocityBcrs() { |
||||
return earth_orbit_velocity_bcrs; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setEarthOrbitVelocityBcrs(float earth_orbit_velocity_bcrs) { |
||||
this->earth_orbit_velocity_bcrs = earth_orbit_velocity_bcrs; |
||||
this->m_earth_orbit_velocity_bcrs_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getSunVelocityLsr() { |
||||
return sun_velocity_lsr; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setSunVelocityLsr(float sun_velocity_lsr) { |
||||
this->sun_velocity_lsr = sun_velocity_lsr; |
||||
this->m_sun_velocity_lsr_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getSolarFlux() { |
||||
return solar_flux; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setSolarFlux(float solar_flux) { |
||||
this->solar_flux = solar_flux; |
||||
this->m_solar_flux_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getAirTemperature() { |
||||
return air_temperature; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setAirTemperature(float air_temperature) { |
||||
this->air_temperature = air_temperature; |
||||
this->m_air_temperature_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getSkyTemperature() { |
||||
return sky_temperature; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setSkyTemperature(float sky_temperature) { |
||||
this->sky_temperature = sky_temperature; |
||||
this->m_sky_temperature_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget::getHpbw() { |
||||
return hpbw; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget::setHpbw(float hpbw) { |
||||
this->hpbw = hpbw; |
||||
this->m_hpbw_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGStarTrackerTarget::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(name && *name != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_azimuth_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_elevation_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_ra_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_dec_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_b_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_l_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_earth_rotation_velocity_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_earth_orbit_velocity_bcrs_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_sun_velocity_lsr_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_solar_flux_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_air_temperature_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_sky_temperature_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_hpbw_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,137 @@
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGStarTrackerTarget.h |
||||
* |
||||
* Star Tracker target. Sent to startracker.target message queue for other plugins to use. |
||||
*/ |
||||
|
||||
#ifndef SWGStarTrackerTarget_H_ |
||||
#define SWGStarTrackerTarget_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGStarTrackerTarget: public SWGObject { |
||||
public: |
||||
SWGStarTrackerTarget(); |
||||
SWGStarTrackerTarget(QString* json); |
||||
virtual ~SWGStarTrackerTarget(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGStarTrackerTarget* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getName(); |
||||
void setName(QString* name); |
||||
|
||||
float getAzimuth(); |
||||
void setAzimuth(float azimuth); |
||||
|
||||
float getElevation(); |
||||
void setElevation(float elevation); |
||||
|
||||
float getRa(); |
||||
void setRa(float ra); |
||||
|
||||
float getDec(); |
||||
void setDec(float dec); |
||||
|
||||
float getB(); |
||||
void setB(float b); |
||||
|
||||
float getL(); |
||||
void setL(float l); |
||||
|
||||
float getEarthRotationVelocity(); |
||||
void setEarthRotationVelocity(float earth_rotation_velocity); |
||||
|
||||
float getEarthOrbitVelocityBcrs(); |
||||
void setEarthOrbitVelocityBcrs(float earth_orbit_velocity_bcrs); |
||||
|
||||
float getSunVelocityLsr(); |
||||
void setSunVelocityLsr(float sun_velocity_lsr); |
||||
|
||||
float getSolarFlux(); |
||||
void setSolarFlux(float solar_flux); |
||||
|
||||
float getAirTemperature(); |
||||
void setAirTemperature(float air_temperature); |
||||
|
||||
float getSkyTemperature(); |
||||
void setSkyTemperature(float sky_temperature); |
||||
|
||||
float getHpbw(); |
||||
void setHpbw(float hpbw); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* name; |
||||
bool m_name_isSet; |
||||
|
||||
float azimuth; |
||||
bool m_azimuth_isSet; |
||||
|
||||
float elevation; |
||||
bool m_elevation_isSet; |
||||
|
||||
float ra; |
||||
bool m_ra_isSet; |
||||
|
||||
float dec; |
||||
bool m_dec_isSet; |
||||
|
||||
float b; |
||||
bool m_b_isSet; |
||||
|
||||
float l; |
||||
bool m_l_isSet; |
||||
|
||||
float earth_rotation_velocity; |
||||
bool m_earth_rotation_velocity_isSet; |
||||
|
||||
float earth_orbit_velocity_bcrs; |
||||
bool m_earth_orbit_velocity_bcrs_isSet; |
||||
|
||||
float sun_velocity_lsr; |
||||
bool m_sun_velocity_lsr_isSet; |
||||
|
||||
float solar_flux; |
||||
bool m_solar_flux_isSet; |
||||
|
||||
float air_temperature; |
||||
bool m_air_temperature_isSet; |
||||
|
||||
float sky_temperature; |
||||
bool m_sky_temperature_isSet; |
||||
|
||||
float hpbw; |
||||
bool m_hpbw_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGStarTrackerTarget_H_ */ |
||||
@ -0,0 +1,409 @@
@@ -0,0 +1,409 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
|
||||
#include "SWGStarTrackerTarget_2.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGStarTrackerTarget_2::SWGStarTrackerTarget_2(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGStarTrackerTarget_2::SWGStarTrackerTarget_2() { |
||||
name = nullptr; |
||||
m_name_isSet = false; |
||||
azimuth = 0.0f; |
||||
m_azimuth_isSet = false; |
||||
elevation = 0.0f; |
||||
m_elevation_isSet = false; |
||||
ra = 0.0f; |
||||
m_ra_isSet = false; |
||||
dec = 0.0f; |
||||
m_dec_isSet = false; |
||||
b = 0.0f; |
||||
m_b_isSet = false; |
||||
l = 0.0f; |
||||
m_l_isSet = false; |
||||
earth_rotation_velocity = 0.0f; |
||||
m_earth_rotation_velocity_isSet = false; |
||||
earth_orbit_velocity_bcrs = 0.0f; |
||||
m_earth_orbit_velocity_bcrs_isSet = false; |
||||
sun_velocity_lsr = 0.0f; |
||||
m_sun_velocity_lsr_isSet = false; |
||||
solar_flux = 0.0f; |
||||
m_solar_flux_isSet = false; |
||||
air_temperature = 0.0f; |
||||
m_air_temperature_isSet = false; |
||||
sky_temperature = 0.0f; |
||||
m_sky_temperature_isSet = false; |
||||
hpbw = 0.0f; |
||||
m_hpbw_isSet = false; |
||||
} |
||||
|
||||
SWGStarTrackerTarget_2::~SWGStarTrackerTarget_2() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerTarget_2::init() { |
||||
name = new QString(""); |
||||
m_name_isSet = false; |
||||
azimuth = 0.0f; |
||||
m_azimuth_isSet = false; |
||||
elevation = 0.0f; |
||||
m_elevation_isSet = false; |
||||
ra = 0.0f; |
||||
m_ra_isSet = false; |
||||
dec = 0.0f; |
||||
m_dec_isSet = false; |
||||
b = 0.0f; |
||||
m_b_isSet = false; |
||||
l = 0.0f; |
||||
m_l_isSet = false; |
||||
earth_rotation_velocity = 0.0f; |
||||
m_earth_rotation_velocity_isSet = false; |
||||
earth_orbit_velocity_bcrs = 0.0f; |
||||
m_earth_orbit_velocity_bcrs_isSet = false; |
||||
sun_velocity_lsr = 0.0f; |
||||
m_sun_velocity_lsr_isSet = false; |
||||
solar_flux = 0.0f; |
||||
m_solar_flux_isSet = false; |
||||
air_temperature = 0.0f; |
||||
m_air_temperature_isSet = false; |
||||
sky_temperature = 0.0f; |
||||
m_sky_temperature_isSet = false; |
||||
hpbw = 0.0f; |
||||
m_hpbw_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerTarget_2::cleanup() { |
||||
if(name != nullptr) {
|
||||
delete name; |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
SWGStarTrackerTarget_2* |
||||
SWGStarTrackerTarget_2::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGStarTrackerTarget_2::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&azimuth, pJson["azimuth"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&elevation, pJson["elevation"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&ra, pJson["ra"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&dec, pJson["dec"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&b, pJson["b"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&l, pJson["l"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&earth_rotation_velocity, pJson["earthRotationVelocity"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&earth_orbit_velocity_bcrs, pJson["earthOrbitVelocityBCRS"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&sun_velocity_lsr, pJson["sunVelocityLSR"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&solar_flux, pJson["solarFlux"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&air_temperature, pJson["airTemperature"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&sky_temperature, pJson["skyTemperature"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&hpbw, pJson["hpbw"], "float", ""); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGStarTrackerTarget_2::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGStarTrackerTarget_2::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(name != nullptr && *name != QString("")){ |
||||
toJsonValue(QString("name"), name, obj, QString("QString")); |
||||
} |
||||
if(m_azimuth_isSet){ |
||||
obj->insert("azimuth", QJsonValue(azimuth)); |
||||
} |
||||
if(m_elevation_isSet){ |
||||
obj->insert("elevation", QJsonValue(elevation)); |
||||
} |
||||
if(m_ra_isSet){ |
||||
obj->insert("ra", QJsonValue(ra)); |
||||
} |
||||
if(m_dec_isSet){ |
||||
obj->insert("dec", QJsonValue(dec)); |
||||
} |
||||
if(m_b_isSet){ |
||||
obj->insert("b", QJsonValue(b)); |
||||
} |
||||
if(m_l_isSet){ |
||||
obj->insert("l", QJsonValue(l)); |
||||
} |
||||
if(m_earth_rotation_velocity_isSet){ |
||||
obj->insert("earthRotationVelocity", QJsonValue(earth_rotation_velocity)); |
||||
} |
||||
if(m_earth_orbit_velocity_bcrs_isSet){ |
||||
obj->insert("earthOrbitVelocityBCRS", QJsonValue(earth_orbit_velocity_bcrs)); |
||||
} |
||||
if(m_sun_velocity_lsr_isSet){ |
||||
obj->insert("sunVelocityLSR", QJsonValue(sun_velocity_lsr)); |
||||
} |
||||
if(m_solar_flux_isSet){ |
||||
obj->insert("solarFlux", QJsonValue(solar_flux)); |
||||
} |
||||
if(m_air_temperature_isSet){ |
||||
obj->insert("airTemperature", QJsonValue(air_temperature)); |
||||
} |
||||
if(m_sky_temperature_isSet){ |
||||
obj->insert("skyTemperature", QJsonValue(sky_temperature)); |
||||
} |
||||
if(m_hpbw_isSet){ |
||||
obj->insert("hpbw", QJsonValue(hpbw)); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGStarTrackerTarget_2::getName() { |
||||
return name; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setName(QString* name) { |
||||
this->name = name; |
||||
this->m_name_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getAzimuth() { |
||||
return azimuth; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setAzimuth(float azimuth) { |
||||
this->azimuth = azimuth; |
||||
this->m_azimuth_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getElevation() { |
||||
return elevation; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setElevation(float elevation) { |
||||
this->elevation = elevation; |
||||
this->m_elevation_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getRa() { |
||||
return ra; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setRa(float ra) { |
||||
this->ra = ra; |
||||
this->m_ra_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getDec() { |
||||
return dec; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setDec(float dec) { |
||||
this->dec = dec; |
||||
this->m_dec_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getB() { |
||||
return b; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setB(float b) { |
||||
this->b = b; |
||||
this->m_b_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getL() { |
||||
return l; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setL(float l) { |
||||
this->l = l; |
||||
this->m_l_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getEarthRotationVelocity() { |
||||
return earth_rotation_velocity; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setEarthRotationVelocity(float earth_rotation_velocity) { |
||||
this->earth_rotation_velocity = earth_rotation_velocity; |
||||
this->m_earth_rotation_velocity_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getEarthOrbitVelocityBcrs() { |
||||
return earth_orbit_velocity_bcrs; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setEarthOrbitVelocityBcrs(float earth_orbit_velocity_bcrs) { |
||||
this->earth_orbit_velocity_bcrs = earth_orbit_velocity_bcrs; |
||||
this->m_earth_orbit_velocity_bcrs_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getSunVelocityLsr() { |
||||
return sun_velocity_lsr; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setSunVelocityLsr(float sun_velocity_lsr) { |
||||
this->sun_velocity_lsr = sun_velocity_lsr; |
||||
this->m_sun_velocity_lsr_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getSolarFlux() { |
||||
return solar_flux; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setSolarFlux(float solar_flux) { |
||||
this->solar_flux = solar_flux; |
||||
this->m_solar_flux_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getAirTemperature() { |
||||
return air_temperature; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setAirTemperature(float air_temperature) { |
||||
this->air_temperature = air_temperature; |
||||
this->m_air_temperature_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getSkyTemperature() { |
||||
return sky_temperature; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setSkyTemperature(float sky_temperature) { |
||||
this->sky_temperature = sky_temperature; |
||||
this->m_sky_temperature_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGStarTrackerTarget_2::getHpbw() { |
||||
return hpbw; |
||||
} |
||||
void |
||||
SWGStarTrackerTarget_2::setHpbw(float hpbw) { |
||||
this->hpbw = hpbw; |
||||
this->m_hpbw_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGStarTrackerTarget_2::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(name && *name != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_azimuth_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_elevation_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_ra_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_dec_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_b_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_l_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_earth_rotation_velocity_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_earth_orbit_velocity_bcrs_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_sun_velocity_lsr_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_solar_flux_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_air_temperature_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_sky_temperature_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_hpbw_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,137 @@
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 6.0.0 |
||||
* Contact: f4exb06@gmail.com |
||||
* |
||||
* NOTE: This class is auto generated by the swagger code generator program. |
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGStarTrackerTarget_2.h |
||||
* |
||||
* Star Tracker target. Sent to startracker.target message queue for other plugins to use. |
||||
*/ |
||||
|
||||
#ifndef SWGStarTrackerTarget_2_H_ |
||||
#define SWGStarTrackerTarget_2_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGStarTrackerTarget_2: public SWGObject { |
||||
public: |
||||
SWGStarTrackerTarget_2(); |
||||
SWGStarTrackerTarget_2(QString* json); |
||||
virtual ~SWGStarTrackerTarget_2(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGStarTrackerTarget_2* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getName(); |
||||
void setName(QString* name); |
||||
|
||||
float getAzimuth(); |
||||
void setAzimuth(float azimuth); |
||||
|
||||
float getElevation(); |
||||
void setElevation(float elevation); |
||||
|
||||
float getRa(); |
||||
void setRa(float ra); |
||||
|
||||
float getDec(); |
||||
void setDec(float dec); |
||||
|
||||
float getB(); |
||||
void setB(float b); |
||||
|
||||
float getL(); |
||||
void setL(float l); |
||||
|
||||
float getEarthRotationVelocity(); |
||||
void setEarthRotationVelocity(float earth_rotation_velocity); |
||||
|
||||
float getEarthOrbitVelocityBcrs(); |
||||
void setEarthOrbitVelocityBcrs(float earth_orbit_velocity_bcrs); |
||||
|
||||
float getSunVelocityLsr(); |
||||
void setSunVelocityLsr(float sun_velocity_lsr); |
||||
|
||||
float getSolarFlux(); |
||||
void setSolarFlux(float solar_flux); |
||||
|
||||
float getAirTemperature(); |
||||
void setAirTemperature(float air_temperature); |
||||
|
||||
float getSkyTemperature(); |
||||
void setSkyTemperature(float sky_temperature); |
||||
|
||||
float getHpbw(); |
||||
void setHpbw(float hpbw); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* name; |
||||
bool m_name_isSet; |
||||
|
||||
float azimuth; |
||||
bool m_azimuth_isSet; |
||||
|
||||
float elevation; |
||||
bool m_elevation_isSet; |
||||
|
||||
float ra; |
||||
bool m_ra_isSet; |
||||
|
||||
float dec; |
||||
bool m_dec_isSet; |
||||
|
||||
float b; |
||||
bool m_b_isSet; |
||||
|
||||
float l; |
||||
bool m_l_isSet; |
||||
|
||||
float earth_rotation_velocity; |
||||
bool m_earth_rotation_velocity_isSet; |
||||
|
||||
float earth_orbit_velocity_bcrs; |
||||
bool m_earth_orbit_velocity_bcrs_isSet; |
||||
|
||||
float sun_velocity_lsr; |
||||
bool m_sun_velocity_lsr_isSet; |
||||
|
||||
float solar_flux; |
||||
bool m_solar_flux_isSet; |
||||
|
||||
float air_temperature; |
||||
bool m_air_temperature_isSet; |
||||
|
||||
float sky_temperature; |
||||
bool m_sky_temperature_isSet; |
||||
|
||||
float hpbw; |
||||
bool m_hpbw_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGStarTrackerTarget_2_H_ */ |
||||