summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh.simha@kdemail.net>2014-08-24 12:15:08 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-05-20 04:08:42 (GMT)
commit1d1680a68afa0260c99725175ed06253efd851e6 (patch)
tree5f0b4787595f21a6384b1ecb47f821bb61f510c7
parent49d1c3d7e05383646eca973a21833a0bb8a0570a (diff)
New struct for Deep Sky Object data [might not be necessary]
A struct to hold deep sky object data for transactions with the database, independent of a SkyObject Will revert if we don't use it. Ideally, everything should be done using CatalogEntryData
-rw-r--r--kstars/skyobjects/deepskyobjectdata.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/kstars/skyobjects/deepskyobjectdata.h b/kstars/skyobjects/deepskyobjectdata.h
new file mode 100644
index 0000000..6e669d3
--- /dev/null
+++ b/kstars/skyobjects/deepskyobjectdata.h
@@ -0,0 +1,69 @@
+/***************************************************************************
+ deepskyobjectdata.h - K Desktop Planetarium
+ -------------------
+ begin : Sun 24 Aug 2014 03:36:32 CDT
+ copyright : (c) 2014 by Akarsh Simha
+ email : akarsh.simha@kdemail.net
+***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+
+#ifndef DEEPSKYOBJECTDATA_H
+#define DEEPSKYOBJECTDATA_H
+/**
+ * @struct DeepSkyObjectData
+ * @short A struct to contain information about a deep sky object, independent of its existence as a DeepSkyObject
+ * @author Akarsh Simha <akarsh.simha@kdemail.net>
+ */
+
+struct DeepSkyObjectData {
+
+ /**
+ * @short Constructor
+ */
+ inline DeepSkyObjectData(): catalogIDNumber(-1), B( NaN::f ), V( NaN::f ), type( SkyObject::TYPE::TYPE_UNKNOWN ),
+ majorAxis( NaN::f ), minorAxis( NaN::f ), positionAngle( NaN::f ) {
+ }
+
+ /**
+ * Data
+ */
+
+ /* Designation */
+ QString name; // Primary designation
+ QString altName; // Alternate designation
+ QString longName; // Trivial name
+ QString catalog; // Catalog corresponding to primary designation
+ QString catalogID; // Catalog ID corresponding to primary designation
+ int catalogIDNumber; // approximation to catalogID, by stripping suffixes and the like (eg: NGC6027B = 6027)
+
+ /* Positional -- J2000.0 */
+ dms RA;
+ dms Dec;
+
+ /* Fluxes */
+ float B;
+ float V;
+
+ /* Type */
+ QString typeString; // detailed type
+ enum SkyObject::TYPE type; // type "rounded-off" to one of KStars' types
+ QString classification; // morphology etc.
+
+ /* Dimension */
+ float majorAxis; // Major axis in arcmin
+ float minorAxis; // Minor axis in arcmin
+ float positionAngle;
+
+};
+
+#endif