[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_B_and_V_values_t?=
From: Akarsh Simha <akarshsimha () gmail ! com>
Date: 2011-06-12 20:40:07
Message-ID: 20110612204007.40282A60B9 () git ! kde ! org
[Download RAW message or body]
Git commit 85f20ce7383611b74c0281c49c5b557b0dce63a5 by Akarsh Simha.
Committed on 12/06/2011 at 21:55.
Pushed by asimha into branch 'master'.
Add B and V values to StarObject. Read them from the data whenever
possible and store them.
M +4 -1 kstars/skyobjects/starobject.cpp
M +1 -0 kstars/skyobjects/starobject.h
http://commits.kde.org/kstars/85f20ce7383611b74c0281c49c5b557b0dce63a5
diff --git a/kstars/skyobjects/starobject.cpp b/kstars/skyobjects/starobject.cpp
index 0e029a5..9354da3 100644
--- a/kstars/skyobjects/starobject.cpp
+++ b/kstars/skyobjects/starobject.cpp
@@ -148,6 +148,7 @@ void StarObject::init( const starData *stardata )
Variability = stardata->flags & 0x04 ;
updateID = updateNumID = 0;
HD = stardata->HD;
+ B = V = 99.9;
// DEBUG Edit. For testing proper motion. Uncomment all related blocks to test.
// WARNING: You can debug only ONE STAR AT A TIME, because
@@ -185,7 +186,7 @@ void StarObject::init( const deepStarData *stardata )
setType( SkyObject::STAR );
if( stardata->V == 30000 && stardata->B != 30000 )
- setMag( ( stardata->B - 1600 ) / 1000.0 );
+ setMag( ( stardata->B - 1600 ) / 1000.0 ); // FIXME: Is it okay to make up stuff like \
this? else
setMag( stardata->V / 1000.0 );
@@ -215,6 +216,8 @@ void StarObject::init( const deepStarData *stardata )
Multiplicity = 0;
Variability = 0;
updateID = updateNumID = 0;
+ B = stardata->B / 1000.0;
+ V = stardata->V / 1000.0;
}
void StarObject::setNames( QString name, QString name2 ) {
diff --git a/kstars/skyobjects/starobject.h b/kstars/skyobjects/starobject.h
index f43633d..1075a9e 100644
--- a/kstars/skyobjects/starobject.h
+++ b/kstars/skyobjects/starobject.h
@@ -255,6 +255,7 @@ private:
double PM_RA, PM_Dec, Parallax; //, VRange, VPeriod;
bool Multiplicity, Variability;
int HD;
+ float B, V; // B and V magnitudes, separately. NOTE 1) This is kept separate from mag for \
a reason. See init( const deepStarData *); 2) This applies only to deep stars at the moment };
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic