diff --git a/nebulae/default/discovery.dat b/nebulae/default/discovery.dat
new file mode 100644
index 0000000000000..ea081b974b707
--- /dev/null
+++ b/nebulae/default/discovery.dat
@@ -0,0 +1,117 @@
+#
+# Columns: DSO, Year of discovery, Discoverer
+# Separator: [tab]
+#
+# Source:
+# - SEDS Messier Database: http://www.messier.seds.org
+#
+M 1 1731 John Bevis
+M 2 1746 Jean-Dominique Maraldi
+M 3 1764 Charles Messier
+M 4 1746 Philippe Loys de Chéseaux
+M 5 1702 Gottfried Kirch
+M 6 1654 Giovanni Batista Hodierna
+M 7 130 Ptolemy
+M 8 1654 Giovanni Batista Hodierna
+M 9 1764 Charles Messier
+M 10 1764 Charles Messier
+M 11 1681 Gottfried Kirch
+M 12 1764 Charles Messier
+M 13 1714 Edmond Halley
+M 14 1764 Charles Messier
+M 15 1746 Jean-Dominique Maraldi
+M 16 1764 Charles Messier
+M 17 1745-1746 Philippe Loys de Chéseaux
+M 18 1764 Charles Messier
+M 19 1764 Charles Messier
+M 20 1764 Charles Messier
+M 21 1764 Charles Messier
+M 22 1665 Abraham Ihle
+M 23 1764 Charles Messier
+M 24 1764 Charles Messier
+M 25 1745-1746 Philippe Loys de Chéseaux
+M 26 1764 Charles Messier
+M 27 1764 Charles Messier
+M 28 1764 Charles Messier
+M 29 1764 Charles Messier
+M 30 1764 Charles Messier
+M 31 905 Abd-al-Rahman Al Sufi
+M 32 1749 Guillaume Legentil
+M 33 1764 Charles Messier
+M 34 1654 Giovanni Batista Hodierna
+M 35 1745-1746 Philippe Loys de Chéseaux
+M 36 1654 Giovanni Batista Hodierna
+M 37 1654 Giovanni Batista Hodierna
+M 38 1654 Giovanni Batista Hodierna
+M 39 1764 Charles Messier
+M 40 1764 Charles Messier
+M 41 -325 Aristoteles
+M 42 1611 Johann Baptist Cysatus
+M 43 1731 Jean-Jacques Dortous de Mairan
+M 44 -260 Aratos of Soli
+M 45 -750 Homer
+M 46 1771 Charles Messier
+M 47 1654 Giovanni Batista Hodierna
+M 48 1771 Charles Messier
+M 49 1771 Charles Messier
+M 50 1711 Giovanni Cassini
+M 51 1773 Charles Messier
+M 52 1774 Charles Messier
+M 53 1775 Johann Elert Bode
+M 54 1778 Charles Messier
+M 55 1752 Nicholas Louis de Lacaille
+M 56 1779 Charles Messier
+M 57 1779 Charles Messier
+M 58 1779 Charles Messier
+M 59 1779 Johann Gottfried Koehler
+M 60 1779 Johann Gottfried Koehler
+M 61 1779 Barnabus Oriani
+M 62 1771 Charles Messier
+M 63 1779 Pierre Méchain
+M 64 1779 Edward Pigott
+M 65 1780 Charles Messier
+M 66 1780 Charles Messier
+M 67 1779 Johann Gottfried Koehler
+M 68 1780 Charles Messier
+M 69 1780 Charles Messier
+M 70 1780 Charles Messier
+M 71 1745-1746 Philippe Loys de Chéseaux
+M 72 1780 Pierre Méchain
+M 73 1780 Charles Messier
+M 74 1780 Pierre Méchain
+M 75 1780 Pierre Méchain
+M 76 1780 Pierre Méchain
+M 77 1780 Pierre Méchain
+M 78 1780 Pierre Méchain
+M 79 1780 Pierre Méchain
+M 80 1781 Charles Messier
+M 81 1774 Johann Elert Bode
+M 82 1774 Johann Elert Bode
+M 83 1752 Nicholas Louis de Lacaille
+M 84 1781 Charles Messier
+M 85 1781 Pierre Méchain
+M 86 1781 Charles Messier
+M 87 1781 Charles Messier
+M 88 1781 Charles Messier
+M 89 1781 Charles Messier
+M 90 1781 Charles Messier
+M 91 1781 Charles Messier
+M 92 1777 Johann Elert Bode
+M 93 1781 Charles Messier
+M 94 1781 Pierre Méchain
+M 95 1781 Pierre Méchain
+M 96 1781 Pierre Méchain
+M 97 1781 Pierre Méchain
+M 98 1781 Pierre Méchain
+M 99 1781 Pierre Méchain
+M 100 1781 Pierre Méchain
+M 101 1781 Pierre Méchain
+M 102 1781 Pierre Méchain, Charles Messier
+M 103 1781 Pierre Méchain
+M 104 1781 Pierre Méchain
+M 105 1781 Pierre Méchain
+M 106 1781 Pierre Méchain
+M 107 1782 Pierre Méchain
+M 108 1781 Pierre Méchain
+M 109 1781 Charles Messier
+M 110 1773 Charles Messier
diff --git a/src/core/modules/Nebula.cpp b/src/core/modules/Nebula.cpp
index 928353b3b5df1..c988a86a38ebe 100644
--- a/src/core/modules/Nebula.cpp
+++ b/src/core/modules/Nebula.cpp
@@ -151,6 +151,8 @@ Nebula::Nebula()
, VdBH_nb("")
, withoutID(false)
, nameI18("")
+ , discoverer("")
+ , discoveryYear("")
, mTypeString()
, bMag(99.)
, vMag(99.)
@@ -429,6 +431,8 @@ QString Nebula::getInfoString(const StelCore *core, const InfoStringGroup& flags
oss << QString("%1: %2 %3").arg(q_("Parallax"), px, qc_("mas", "parallax")) << "
";
}
+ if (!discoverer.isEmpty())
+ oss << QString("%1: %2 (%3)").arg(q_("Discoverer"), discoverer, discoveryYear) << "
";
if (!getMorphologicalTypeDescription().isEmpty())
oss << QString("%1: %2.").arg(q_("Morphological description"), getMorphologicalTypeDescription()) << "
";
}
diff --git a/src/core/modules/Nebula.hpp b/src/core/modules/Nebula.hpp
index 61476f53cd8ee..50c19f5160a29 100644
--- a/src/core/modules/Nebula.hpp
+++ b/src/core/modules/Nebula.hpp
@@ -222,6 +222,7 @@ friend class NebulaMgr;
float getSurfaceArea(void) const;
void setProperName(QString name) { englishName = name; }
+ void setDiscoveryData(QString name, QString year) { discoverer = name; discoveryYear = year; }
void addNameAlias(QString name) { englishAliases.append(name); englishAliases.removeDuplicates(); }
void removeAllNames() { englishName=""; englishAliases.clear(); }
@@ -268,54 +269,56 @@ friend class NebulaMgr;
QString getMorphologicalTypeDescription() const;
unsigned int DSO_nb;
- unsigned int M_nb; // Messier Catalog number
- unsigned int NGC_nb; // New General Catalog number
- unsigned int IC_nb; // Index Catalog number
- unsigned int C_nb; // Caldwell Catalog number
- unsigned int B_nb; // Barnard Catalog number (Dark Nebulae)
- unsigned int Sh2_nb; // Sharpless Catalog number (Catalogue of HII Regions (Sharpless, 1959))
- unsigned int VdB_nb; // van den Bergh Catalog number (Catalogue of Reflection Nebulae (van den Bergh, 1966))
- unsigned int RCW_nb; // RCW Catalog number (H-α emission regions in Southern Milky Way (Rodgers+, 1960))
- unsigned int LDN_nb; // LDN Catalog number (Lynds' Catalogue of Dark Nebulae (Lynds, 1962))
- unsigned int LBN_nb; // LBN Catalog number (Lynds' Catalogue of Bright Nebulae (Lynds, 1965))
- unsigned int Cr_nb; // Collinder Catalog number
- unsigned int Mel_nb; // Melotte Catalog number
- unsigned int PGC_nb; // PGC number (Catalog of galaxies)
- unsigned int UGC_nb; // UGC number (The Uppsala General Catalogue of Galaxies)
- unsigned int Arp_nb; // Arp number (Atlas of Peculiar Galaxies (Arp, 1966))
- unsigned int VV_nb; // VV number (The Catalogue of Interacting Galaxies (Vorontsov-Velyaminov+, 2001))
- unsigned int DWB_nb; // DWB number (Catalogue and distances of optically visible H II regions (Dickel+, 1969))
- unsigned int Tr_nb; // Tr number (Trumpler Catalogue)
- unsigned int St_nb; // St number (Stock Catalogue)
- unsigned int Ru_nb; // Ru number (Ruprecht Catalogue)
- unsigned int VdBHa_nb; // vdB-Ha number (van den Bergh-Hagen Catalogue)
- QString Ced_nb; // Ced number (Cederblad Catalog of bright diffuse Galactic nebulae)
- QString PK_nb; // PK number (Catalogue of Galactic Planetary Nebulae)
- QString PNG_nb; // PN G number (Strasbourg-ESO Catalogue of Galactic Planetary Nebulae (Acker+, 1992))
- QString SNRG_nb; // SNR G number (A catalogue of Galactic supernova remnants (Green, 2014))
- QString ACO_nb; // ACO number (Rich Clusters of Galaxies (Abell+, 1989))
- QString HCG_nb; // HCG number (Hickson Compact Group (Hickson, 1989))
- QString ESO_nb; // ESO number (ESO/Uppsala Survey of the ESO(B) Atlas (Lauberts, 1982))
- QString VdBH_nb; // VdBH number (Southern Stars embedded in nebulosity (van den Bergh+, 1975))
+ unsigned int M_nb; // Messier Catalog number
+ unsigned int NGC_nb; // New General Catalog number
+ unsigned int IC_nb; // Index Catalog number
+ unsigned int C_nb; // Caldwell Catalog number
+ unsigned int B_nb; // Barnard Catalog number (Dark Nebulae)
+ unsigned int Sh2_nb; // Sharpless Catalog number (Catalogue of HII Regions (Sharpless, 1959))
+ unsigned int VdB_nb; // van den Bergh Catalog number (Catalogue of Reflection Nebulae (van den Bergh, 1966))
+ unsigned int RCW_nb; // RCW Catalog number (H-α emission regions in Southern Milky Way (Rodgers+, 1960))
+ unsigned int LDN_nb; // LDN Catalog number (Lynds' Catalogue of Dark Nebulae (Lynds, 1962))
+ unsigned int LBN_nb; // LBN Catalog number (Lynds' Catalogue of Bright Nebulae (Lynds, 1965))
+ unsigned int Cr_nb; // Collinder Catalog number
+ unsigned int Mel_nb; // Melotte Catalog number
+ unsigned int PGC_nb; // PGC number (Catalog of galaxies)
+ unsigned int UGC_nb; // UGC number (The Uppsala General Catalogue of Galaxies)
+ unsigned int Arp_nb; // Arp number (Atlas of Peculiar Galaxies (Arp, 1966))
+ unsigned int VV_nb; // VV number (The Catalogue of Interacting Galaxies (Vorontsov-Velyaminov+, 2001))
+ unsigned int DWB_nb; // DWB number (Catalogue and distances of optically visible H II regions (Dickel+, 1969))
+ unsigned int Tr_nb; // Tr number (Trumpler Catalogue)
+ unsigned int St_nb; // St number (Stock Catalogue)
+ unsigned int Ru_nb; // Ru number (Ruprecht Catalogue)
+ unsigned int VdBHa_nb; // vdB-Ha number (van den Bergh-Hagen Catalogue)
+ QString Ced_nb; // Ced number (Cederblad Catalog of bright diffuse Galactic nebulae)
+ QString PK_nb; // PK number (Catalogue of Galactic Planetary Nebulae)
+ QString PNG_nb; // PN G number (Strasbourg-ESO Catalogue of Galactic Planetary Nebulae (Acker+, 1992))
+ QString SNRG_nb; // SNR G number (A catalogue of Galactic supernova remnants (Green, 2014))
+ QString ACO_nb; // ACO number (Rich Clusters of Galaxies (Abell+, 1989))
+ QString HCG_nb; // HCG number (Hickson Compact Group (Hickson, 1989))
+ QString ESO_nb; // ESO number (ESO/Uppsala Survey of the ESO(B) Atlas (Lauberts, 1982))
+ QString VdBH_nb; // VdBH number (Southern Stars embedded in nebulosity (van den Bergh+, 1975))
bool withoutID;
- QString englishName; // English name
- QStringList englishAliases; // English aliases
- QString nameI18; // Nebula name
- QStringList nameI18Aliases; // Nebula aliases
- QString mTypeString; // Morphological type of object (as string)
- float bMag; // B magnitude
- float vMag; // V magnitude. For Dark Nebulae, opacity is stored here.
- float majorAxisSize; // Major axis size in degrees
- float minorAxisSize; // Minor axis size in degrees
- int orientationAngle; // Orientation angle in degrees
- float oDistance; // distance (kpc)
- float oDistanceErr; // Error of distance (kpc)
+ QString englishName; // English name
+ QStringList englishAliases; // English aliases
+ QString nameI18; // Nebula name
+ QStringList nameI18Aliases; // Nebula aliases
+ QString discoverer; // The name of discoverer
+ QString discoveryYear; // Year(s) of discovery
+ QString mTypeString; // Morphological type of object (as string)
+ float bMag; // B magnitude
+ float vMag; // V magnitude. For Dark Nebulae, opacity is stored here.
+ float majorAxisSize; // Major axis size in degrees
+ float minorAxisSize; // Minor axis size in degrees
+ int orientationAngle; // Orientation angle in degrees
+ float oDistance; // distance (kpc)
+ float oDistanceErr; // Error of distance (kpc)
float redshift;
float redshiftErr;
float parallax;
float parallaxErr;
- Vec3d XYZ; // Cartesian equatorial position (J2000.0)
- Vec3d XY; // Store temporary 2D position
+ Vec3d XYZ; // Cartesian equatorial position (J2000.0)
+ Vec3d XY; // Store temporary 2D position
NebulaType nType;
SphericalRegionP pointRegion;
@@ -328,13 +331,13 @@ friend class NebulaMgr;
static StelTextureSP texGalaxyLarge; // Type 0_large
static StelTextureSP texOpenCluster; // Type 1
static StelTextureSP texOpenClusterLarge; // Type 1_large
- static StelTextureSP texOpenClusterXLarge; // Type 1_extralarge
+ static StelTextureSP texOpenClusterXLarge; // Type 1_extralarge
static StelTextureSP texGlobularCluster; // Type 2
- static StelTextureSP texGlobularClusterLarge; // Type 2_large
+ static StelTextureSP texGlobularClusterLarge; // Type 2_large
static StelTextureSP texPlanetaryNebula; // Type 3
- static StelTextureSP texDiffuseNebula; // Type 4
- static StelTextureSP texDiffuseNebulaLarge; // Type 4_large
- static StelTextureSP texDiffuseNebulaXLarge; // Type 4_extralarge
+ static StelTextureSP texDiffuseNebula; // Type 4
+ static StelTextureSP texDiffuseNebulaLarge; // Type 4_large
+ static StelTextureSP texDiffuseNebulaXLarge; // Type 4_extralarge
static StelTextureSP texDarkNebula; // Type 5
static StelTextureSP texDarkNebulaLarge; // Type 5_large
static StelTextureSP texOpenClusterWithNebulosity; // Type 6
diff --git a/src/core/modules/NebulaMgr.cpp b/src/core/modules/NebulaMgr.cpp
index a16fd1106f75b..420ce453da6be 100644
--- a/src/core/modules/NebulaMgr.cpp
+++ b/src/core/modules/NebulaMgr.cpp
@@ -812,11 +812,12 @@ NebulaP NebulaMgr::search(const QString& name)
void NebulaMgr::loadNebulaSet(const QString& setName)
{
- QString srcCatalogPath = StelFileMgr::findFile("nebulae/" + setName + "/catalog.txt");
+ QString srcCatalogPath = StelFileMgr::findFile("nebulae/" + setName + "/catalog.txt");
QString dsoCatalogPath = StelFileMgr::findFile("nebulae/" + setName + "/catalog-" + StellariumDSOCatalogVersion + ".dat");
if (dsoCatalogPath.isEmpty()) // Extended edition is not exist, let's try find standard edition
- dsoCatalogPath = StelFileMgr::findFile("nebulae/" + setName + "/catalog.dat");
+ dsoCatalogPath = StelFileMgr::findFile("nebulae/" + setName + "/catalog.dat");
QString dsoOutlinesPath = StelFileMgr::findFile("nebulae/" + setName + "/outlines.dat");
+ QString dsoDiscoveryPath = StelFileMgr::findFile("nebulae/" + setName + "/discovery.dat");
dsoArray.clear();
dsoIndex.clear();
@@ -840,6 +841,9 @@ void NebulaMgr::loadNebulaSet(const QString& setName)
if (!dsoOutlinesPath.isEmpty())
loadDSOOutlines(dsoOutlinesPath);
+
+ if (!dsoDiscoveryPath.isEmpty())
+ loadDSODiscoveryData(dsoDiscoveryPath);
}
// Look for a nebula by XYZ coords
@@ -1478,7 +1482,6 @@ bool NebulaMgr::loadDSONames(const QString &filename)
QStringList nodata;
nodata.clear();
int totalRecords=0;
- int lineNumber=0;
int readOk=0;
unsigned int nb;
NebulaP e;
@@ -1486,7 +1489,6 @@ bool NebulaMgr::loadDSONames(const QString &filename)
while (!dsoNameFile.atEnd())
{
record = QString::fromUtf8(dsoNameFile.readLine());
- lineNumber++;
if (commentRx.match(record).hasMatch())
continue;
@@ -1628,6 +1630,52 @@ bool NebulaMgr::loadDSONames(const QString &filename)
return true;
}
+bool NebulaMgr::loadDSODiscoveryData(const QString &filename)
+{
+ qDebug() << "Loading DSO discovery data ...";
+ QFile dsoDiscoveryFile(filename);
+ if (!dsoDiscoveryFile.open(QIODevice::ReadOnly | QIODevice::Text))
+ {
+ qWarning().noquote() << "DSO discovery data file" << QDir::toNativeSeparators(filename) << "not found.";
+ return false;
+ }
+
+ int readOk = 0;
+ int totalRecords = 0;
+ QString record, dso, dYear, dName;
+ NebulaP e;
+ while (!dsoDiscoveryFile.atEnd())
+ {
+ record = QString::fromUtf8(dsoDiscoveryFile.readLine());
+ if (record.startsWith("//") || record.startsWith("#") || record.isEmpty())
+ continue;
+
+ totalRecords++;
+ #if (QT_VERSION>=QT_VERSION_CHECK(5, 14, 0))
+ QStringList list=record.split("\t", Qt::KeepEmptyParts);
+ #else
+ QStringList list=record.split("\t", QString::KeepEmptyParts);
+ #endif
+
+ dso = list.at(0).trimmed();
+ dYear = list.at(1).trimmed();
+ dName = list.at(2).trimmed();
+
+ e = search(dso);
+ if (e.isNull()) // maybe this is inner number of DSO
+ e = searchDSO(dso.toUInt());
+
+ if (!e.isNull())
+ {
+ e->setDiscoveryData(dName, dYear);
+ readOk++;
+ }
+ }
+ dsoDiscoveryFile.close();
+ qDebug().noquote() << "Loaded" << readOk << "/" << totalRecords << "DSO discovery records successfully";
+ return true;
+}
+
bool NebulaMgr::loadDSOOutlines(const QString &filename)
{
qDebug() << "Loading DSO outline data ...";
diff --git a/src/core/modules/NebulaMgr.hpp b/src/core/modules/NebulaMgr.hpp
index 6ac9031791a38..132699ccf0dd1 100644
--- a/src/core/modules/NebulaMgr.hpp
+++ b/src/core/modules/NebulaMgr.hpp
@@ -1003,6 +1003,9 @@ private slots:
bool loadDSONames(const QString& filename);
// Load outlines for DSO
bool loadDSOOutlines(const QString& filename);
+ // Load discovery data for DSO
+ // TODO: Move these data into main DSO catalog to fast reading (v4)
+ bool loadDSODiscoveryData(const QString& filename);
QVector dsoArray; // The DSO list
QHash dsoIndex;