[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bkstars=5D_kstars/skyobjects=3A_Add_methods_to_retur?=
From: Akarsh Simha <akarshsimha () gmail ! com>
Date: 2011-06-12 20:40:07
Message-ID: 20110612204007.42F48A60BB () git ! kde ! org
[Download RAW message or body]
Git commit ceba69650a4160cf64902ee49a2a37d7ee9b8986 by Akarsh Simha.
Committed on 12/06/2011 at 22:07.
Pushed by asimha into branch 'master'.
Add methods to return B and V magnitudes and B - V color index for
stars whenever available.
M +16 -0 kstars/skyobjects/starobject.h
http://commits.kde.org/kstars/ceba69650a4160cf64902ee49a2a37d7ee9b8986
diff --git a/kstars/skyobjects/starobject.h b/kstars/skyobjects/starobject.h
index 1075a9e..3fa02ce 100644
--- a/kstars/skyobjects/starobject.h
+++ b/kstars/skyobjects/starobject.h
@@ -237,6 +237,22 @@ public:
*/
virtual double labelOffset() const;
+ /**
+ *@return the Visual magnitude of the star
+ */
+ inline float getVMag() const { return V; }
+
+ /**
+ *@return the blue magnitude of the star
+ */
+ inline float getBMag() const { return B; }
+
+ /**
+ *@return the B - V color index of the star, or a nonsense number
+ *larger than 30 if it's not well defined
+ */
+ inline float getBVIndex() const { return ( ( B < 30.0 && V < 30.0 ) ? B - V : 99.9 ); }
+
quint64 updateID;
quint64 updateNumID;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic