summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander V. Wolf <alex.v.wolf@gmail.com>2021-12-29 22:21:10 +0700
committerAlexander V. Wolf <alex.v.wolf@gmail.com>2021-12-29 22:21:10 +0700
commit382a5f36ae2e6d549036cb9d6b24123521c39927 (patch)
treeeee95f1642c3de80551644e884d5529a7df5e9a8
parent715175aeb492e8470da25d12955e7fcdac7f4459 (diff)
Added ability to support multi supergroups for satellitesrefactoring/qcharts
-rw-r--r--plugins/Satellites/src/Satellites.cpp23
-rw-r--r--plugins/Satellites/src/Satellites.hpp2
2 files changed, 20 insertions, 5 deletions
diff --git a/plugins/Satellites/src/Satellites.cpp b/plugins/Satellites/src/Satellites.cpp
index 51890b64c5..daf1a485d4 100644
--- a/plugins/Satellites/src/Satellites.cpp
+++ b/plugins/Satellites/src/Satellites.cpp
@@ -1259,9 +1259,16 @@ bool Satellites::add(const TleData& tleData)
satGroups.append(fileName);
// add "supergroups", based on CelesTrak's groups
- QString superGroup = satSuperGroupsMap.value(fileName, "");
- if (!superGroup.isEmpty() && !satGroups.contains(superGroup))
- satGroups.append(superGroup);
+ QStringList superGroup = satSuperGroupsMap.values(fileName);
+ if (superGroup.size()>0)
+ {
+ for (int i=0; i<superGroup.size(); i++)
+ {
+ QString groupId = superGroup.at(i).toLocal8Bit().constData();
+ if (!satGroups.contains(groupId))
+ satGroups.append(groupId);
+ }
+ }
}
if (!satGroups.isEmpty())
{
@@ -2374,11 +2381,15 @@ IridiumFlaresPredictionList Satellites::getIridiumFlaresPrediction()
void Satellites::createSuperGroupsList()
{
QString communications = "communications", navigation = "navigation", scientific = "scientific",
- earthresources = "earth resources";
+ earthresources = "earth resources", gps = "gps", glonass = "glonass",
+ geostationary = "geostationary";
satSuperGroupsMap = {
{ "geo", communications },
+ { "geo", geostationary },
{ "gpz", communications },
+ { "gpz", geostationary },
{ "gpz-plus", communications },
+ { "gpz-plus", geostationary },
{ "intelsat", communications },
{ "ses", communications },
{ "iridium", communications },
@@ -2394,12 +2405,15 @@ void Satellites::createSuperGroupsList()
{ "satnogs", communications },
{ "gorizont", communications },
{ "raduga", communications },
+ { "raduga", geostationary },
{ "molniya", communications },
{ "gnss", navigation },
{ "gps", navigation },
{ "gps-ops", navigation },
+ { "gps-ops", gps },
{ "glonass", navigation },
{ "glo-ops", navigation },
+ { "glo-ops", glonass },
{ "galileo", navigation },
{ "beidou", navigation },
{ "sbas", navigation },
@@ -2409,6 +2423,7 @@ void Satellites::createSuperGroupsList()
{ "geodetic", scientific },
{ "engineering", scientific },
{ "education", scientific },
+ { "goes", scientific },
{ "goes", earthresources },
{ "resource", earthresources },
{ "sarsat", earthresources },
diff --git a/plugins/Satellites/src/Satellites.hpp b/plugins/Satellites/src/Satellites.hpp
index 4387feda0e..90e66c54b5 100644
--- a/plugins/Satellites/src/Satellites.hpp
+++ b/plugins/Satellites/src/Satellites.hpp
@@ -672,7 +672,7 @@ private:
// GUI
SatellitesDialog* configDialog;
- QMap<QString, QString> satSuperGroupsMap;
+ QMultiMap<QString, QString> satSuperGroupsMap;
static QString SatellitesCatalogVersion;