summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander V. Wolf <alex.v.wolf@gmail.com>2023-05-26 19:39:15 +0700
committerAlexander V. Wolf <alex.v.wolf@gmail.com>2023-05-26 19:39:15 +0700
commit3a0bf0e4a18c75570aa047b04456c33ed4c4db1b (patch)
treed34a99dd3ef40d32d8e6a9526c87c5de08cef917
parent9ac490017693872877d62738660b98c6636f0a15 (diff)
Add support Periodic Comet Number for comet-like asteroidssso/discovery
-rw-r--r--plugins/SolarSystemEditor/src/SolarSystemEditor.cpp11
-rw-r--r--plugins/SolarSystemEditor/src/SolarSystemEditor.hpp3
2 files changed, 14 insertions, 0 deletions
diff --git a/plugins/SolarSystemEditor/src/SolarSystemEditor.cpp b/plugins/SolarSystemEditor/src/SolarSystemEditor.cpp
index df6f439713..30c46d9105 100644
--- a/plugins/SolarSystemEditor/src/SolarSystemEditor.cpp
+++ b/plugins/SolarSystemEditor/src/SolarSystemEditor.cpp
@@ -135,6 +135,13 @@ void SolarSystemEditor::init()
return;
}
+ cometLikeAsteroids.clear();
+ cometLikeAsteroids = {
+ { 2060, "95P" }, { 4015, "107P" }, { 7968, "133P" }, { 60558, "174P" },
+ { 118401, "176P" }, { 248370, "433P" }, { 300163, "288P" }, { 323137, "282P" },
+ { 457175, "362P" }
+ };
+
loadPeriodicCometDesignators();
loadDiscoveryCircumstances();
loadCometData();
@@ -989,6 +996,10 @@ SsoElements SolarSystemEditor::readMpcOneLineMinorPlanetElements(QString oneLine
//Use the whole string, just in case
name = column;
}
+ // Add Periodic Comet Number for comet-like asteroids
+ QString dateCode = cometLikeAsteroids.value(minorPlanetNumber, "");
+ if (!dateCode.isEmpty())
+ result.insert("date_code", QString("%1/(%2) %3").arg(dateCode, QString::number(minorPlanetNumber), name));
}
//In the other case, the name is already the IAU designation
}
diff --git a/plugins/SolarSystemEditor/src/SolarSystemEditor.hpp b/plugins/SolarSystemEditor/src/SolarSystemEditor.hpp
index f1b026d561..d05da40552 100644
--- a/plugins/SolarSystemEditor/src/SolarSystemEditor.hpp
+++ b/plugins/SolarSystemEditor/src/SolarSystemEditor.hpp
@@ -248,6 +248,9 @@ private:
//! The list of discovery circumstances for numbered minor planets
QHash<int, DiscoveryCircumstances> numberedMinorPlanets;
+ //! The list of periodic comet number for comet-like asteroids
+ QHash<int, QString> cometLikeAsteroids;
+
//! Gets the names of the minor planet objects listed in a ssystem.ini-formatted file.
//! Used internally in readAllCurrentSsoNames() and in init() to initialize
//! defaultSsoNames.