mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-10 10:33:29 -05:00
Merge pull request #2151 from dforsi/feature/satellitetrackersettings
Add a button to reset the list of TLEs to defaults compiled in Sdrangel
This commit is contained in:
commit
e381f0b3e4
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 31 KiB |
BIN
doc/img/SatelliteTracker_plugin_settingsdialog4.png
Normal file
BIN
doc/img/SatelliteTracker_plugin_settingsdialog4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -103,14 +103,15 @@ For commands, scripts and speech, the following variables can be substituted: `$
|
||||
|
||||
![Satellite tracker settings dialog](../../../doc/img/SatelliteTracker_plugin_settingsdialog2.png)
|
||||
|
||||
On the TLEs tab, you can provide a list of URL from which satellite Two Line Element files can be downloaded from.
|
||||
On the TLEs tab, you can manage the default list of URLs from which satellite Two Line Element files can be downloaded from.
|
||||
You can add, edit, delete single entries or restore the default list.
|
||||
TLE files contain the orbital parameters for a satellite and are required in order to be able to calculate a satellites position.
|
||||
TLEs for may satellites can be obtained from https://www.celestrak.com/NORAD/elements/
|
||||
To use a TLE file on a local disk, use a URL such as file:my_tle.txt
|
||||
|
||||
![Satellite tracker settings dialog](../../../doc/img/SatelliteTracker_plugin_settingsdialog3.png)
|
||||
|
||||
On the display tab, you can set:
|
||||
On the Display tab, you can set:
|
||||
|
||||
* The update period in seconds, which controls how frequently satellite positions are calculated.
|
||||
* The default frequency in MHz that is used for calculating Doppler and free space path loss in the Satellite Data table.
|
||||
@ -122,6 +123,13 @@ only be displayed if the source in the Rotator Controller is set to this Satelli
|
||||
* Whether times are displayed in the local time zone or UTC.
|
||||
* Whether to draw the satellites on the map.
|
||||
|
||||
![Satellite tracker settings dialog](../../../doc/img/SatelliteTracker_plugin_settingsdialog4.png)
|
||||
|
||||
On the Replay tab, you can set what happens when the start button is pressed:
|
||||
* Whether to replay a satellite pass in the past.
|
||||
* The start date and time of the replay.
|
||||
* Whether to also send the replayed date and time to the Map feature.
|
||||
|
||||
<h3>9: Latitude</h3>
|
||||
|
||||
Specifies the latitude in decimal degrees (North positive) of the antenna location.
|
||||
|
@ -25,12 +25,6 @@
|
||||
|
||||
#include "satellitetrackersettings.h"
|
||||
|
||||
#define DEAFULT_TARGET "ISS"
|
||||
#define DEFAULT_TLES {"https://db.satnogs.org/api/tle/", "https://www.amsat.org/tle/current/nasabare.txt", "http://celestrak.org/NORAD/elements/gp.php?GROUP=weather&FORMAT=tle", "https://celestrak.org/NORAD/elements/gp.php?GROUP=gps-ops&FORMAT=tle", "https://celestrak.org/NORAD/elements/gp.php?CATNR=36395&FORMAT=tle"}
|
||||
#define DEFAULT_DATE_FORMAT "yyyy/MM/dd"
|
||||
#define DEFAULT_AOS_SPEECH "${name} is visible for ${duration} minutes. Max elevation, ${elevation} degrees."
|
||||
#define DEFAULT_LOS_SPEECH "${name} is no longer visible."
|
||||
|
||||
SatelliteTrackerSettings::SatelliteTrackerSettings() :
|
||||
m_rollupState(nullptr)
|
||||
{
|
||||
|
@ -28,6 +28,12 @@
|
||||
|
||||
class Serializable;
|
||||
|
||||
#define DEAFULT_TARGET "ISS"
|
||||
#define DEFAULT_TLES {"https://db.satnogs.org/api/tle/", "https://www.amsat.org/tle/current/nasabare.txt", "https://celestrak.org/NORAD/elements/gp.php?GROUP=weather&FORMAT=tle", "https://celestrak.org/NORAD/elements/gp.php?GROUP=gps-ops&FORMAT=tle", "https://celestrak.org/NORAD/elements/gp.php?CATNR=36395&FORMAT=tle"}
|
||||
#define DEFAULT_DATE_FORMAT "yyyy/MM/dd"
|
||||
#define DEFAULT_AOS_SPEECH "${name} is visible for ${duration} minutes. Max elevation, ${elevation} degrees."
|
||||
#define DEFAULT_LOS_SPEECH "${name} is no longer visible."
|
||||
|
||||
#define SAT_COL_COLUMNS 18
|
||||
|
||||
struct SatelliteTrackerSettings
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "util/units.h"
|
||||
#include "satellitetrackersettingsdialog.h"
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
|
||||
SatelliteTrackerSettingsDialog::SatelliteTrackerSettingsDialog(SatelliteTrackerSettings *settings,
|
||||
QWidget* parent) :
|
||||
@ -49,12 +50,7 @@ SatelliteTrackerSettingsDialog::SatelliteTrackerSettingsDialog(SatelliteTrackerS
|
||||
ui->dateFormat->setText(settings->m_dateFormat);
|
||||
ui->utc->setChecked(settings->m_utc);
|
||||
ui->drawOnMap->setChecked(settings->m_drawOnMap);
|
||||
for (int i = 0; i < settings->m_tles.size(); i++)
|
||||
{
|
||||
QListWidgetItem *item = new QListWidgetItem(settings->m_tles[i]);
|
||||
item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled);
|
||||
ui->tles->addItem(item);
|
||||
}
|
||||
updateTleWidget(settings->m_tles);
|
||||
ui->replayEnabled->setChecked(settings->m_replayEnabled);
|
||||
ui->replayDateTime->setDateTime(settings->m_replayStartDateTime);
|
||||
ui->sendTimeToMap->setChecked(settings->m_sendTimeToMap);
|
||||
@ -65,9 +61,19 @@ SatelliteTrackerSettingsDialog::~SatelliteTrackerSettingsDialog()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SatelliteTrackerSettingsDialog::updateTleWidget(QList<QString> tles)
|
||||
{
|
||||
for (int i = 0; i < tles.size(); i++)
|
||||
{
|
||||
QListWidgetItem *item = new QListWidgetItem(tles[i]);
|
||||
item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled);
|
||||
ui->tles->addItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
void SatelliteTrackerSettingsDialog::on_addTle_clicked()
|
||||
{
|
||||
QListWidgetItem *item = new QListWidgetItem("http://");
|
||||
QListWidgetItem *item = new QListWidgetItem("https://");
|
||||
item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled);
|
||||
ui->tles->addItem(item);
|
||||
}
|
||||
@ -79,6 +85,16 @@ void SatelliteTrackerSettingsDialog::on_removeTle_clicked()
|
||||
delete items[i];
|
||||
}
|
||||
|
||||
void SatelliteTrackerSettingsDialog::on_defaultTles_clicked()
|
||||
{
|
||||
QMessageBox::StandardButton reply;
|
||||
reply = QMessageBox::question(this, "Confirm ovewrite", "Replace the current TLE list with the default?", QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
|
||||
if (reply == QMessageBox::Yes) {
|
||||
ui->tles->clear();
|
||||
updateTleWidget(DEFAULT_TLES);
|
||||
}
|
||||
}
|
||||
|
||||
void SatelliteTrackerSettingsDialog::accept()
|
||||
{
|
||||
m_settings->m_heightAboveSeaLevel = ui->height->value();
|
||||
|
@ -31,6 +31,8 @@ public:
|
||||
explicit SatelliteTrackerSettingsDialog(SatelliteTrackerSettings* settings, QWidget* parent = 0);
|
||||
~SatelliteTrackerSettingsDialog();
|
||||
|
||||
void updateTleWidget(QList<QString> tles);
|
||||
|
||||
SatelliteTrackerSettings *m_settings;
|
||||
|
||||
private slots:
|
||||
@ -38,6 +40,8 @@ private slots:
|
||||
void on_removeTle_clicked();
|
||||
void accept();
|
||||
|
||||
void on_defaultTles_clicked();
|
||||
|
||||
private:
|
||||
Ui::SatelliteTrackerSettingsDialog* ui;
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>487</width>
|
||||
<height>543</height>
|
||||
<height>603</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -363,6 +363,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="defaultTles">
|
||||
<property name="toolTip">
|
||||
<string>Load preset TLE sources</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../sdrgui/resources/res.qrc">
|
||||
<normaloff>:/star.png</normaloff>:/star.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="buttonHorizontalSpacer">
|
||||
<property name="orientation">
|
||||
@ -680,7 +694,9 @@
|
||||
<tabstop>utc</tabstop>
|
||||
<tabstop>drawOnMap</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../../../sdrgui/resources/res.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
|
Loading…
Reference in New Issue
Block a user