diff --git a/doc/img/SatelliteTracker_plugin_settingsdialog2.png b/doc/img/SatelliteTracker_plugin_settingsdialog2.png
index 208d87b51..08d046658 100644
Binary files a/doc/img/SatelliteTracker_plugin_settingsdialog2.png and b/doc/img/SatelliteTracker_plugin_settingsdialog2.png differ
diff --git a/doc/img/SatelliteTracker_plugin_settingsdialog4.png b/doc/img/SatelliteTracker_plugin_settingsdialog4.png
new file mode 100644
index 000000000..7726a464a
Binary files /dev/null and b/doc/img/SatelliteTracker_plugin_settingsdialog4.png differ
diff --git a/plugins/feature/satellitetracker/readme.md b/plugins/feature/satellitetracker/readme.md
index 6dc1b5cc7..a06597f2f 100644
--- a/plugins/feature/satellitetracker/readme.md
+++ b/plugins/feature/satellitetracker/readme.md
@@ -103,14 +103,15 @@ For commands, scripts and speech, the following variables can be substituted: `$

-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

-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.
+
+
+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.
+
9: Latitude
Specifies the latitude in decimal degrees (North positive) of the antenna location.
diff --git a/plugins/feature/satellitetracker/satellitetrackersettings.cpp b/plugins/feature/satellitetracker/satellitetrackersettings.cpp
index 0c1866756..eae244d47 100644
--- a/plugins/feature/satellitetracker/satellitetrackersettings.cpp
+++ b/plugins/feature/satellitetracker/satellitetrackersettings.cpp
@@ -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)
{
diff --git a/plugins/feature/satellitetracker/satellitetrackersettings.h b/plugins/feature/satellitetracker/satellitetrackersettings.h
index cdf408e86..8bad64d72 100644
--- a/plugins/feature/satellitetracker/satellitetrackersettings.h
+++ b/plugins/feature/satellitetracker/satellitetrackersettings.h
@@ -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
diff --git a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.cpp b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.cpp
index 229458a7a..29ace8179 100644
--- a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.cpp
+++ b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.cpp
@@ -18,6 +18,7 @@
#include "util/units.h"
#include "satellitetrackersettingsdialog.h"
#include
+#include
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 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();
diff --git a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.h b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.h
index da44ca295..b9c0344e7 100644
--- a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.h
+++ b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.h
@@ -31,6 +31,8 @@ public:
explicit SatelliteTrackerSettingsDialog(SatelliteTrackerSettings* settings, QWidget* parent = 0);
~SatelliteTrackerSettingsDialog();
+ void updateTleWidget(QList 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;
};
diff --git a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.ui b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.ui
index 172273237..8450411fb 100644
--- a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.ui
+++ b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.ui
@@ -7,7 +7,7 @@
0
0
487
- 543
+ 603
@@ -363,6 +363,20 @@
+ -
+
+
+ Load preset TLE sources
+
+
+
+
+
+
+ :/star.png:/star.png
+
+
+
-
@@ -680,7 +694,9 @@
utc
drawOnMap
-
+
+
+
buttonBox