[Kstars-devel] branches/kstars/summer/kdeedu/kstars/kstars

Akarsh Simha akarshsimha at gmail.com
Fri Jul 11 16:43:16 CEST 2008


SVN commit 830959 by asimha:

Commiting changes required to test proper motion. These currently make
no apparent difference (other than increasing the memory
usage!). Commiting them because I'm now working from two places.

CCMAIL: kstars-devel at kde.org



 M  +22 -1     starobject.cpp  
 M  +1 -0      starobject.h  


--- branches/kstars/summer/kdeedu/kstars/kstars/starobject.cpp #830958:830959
@@ -165,6 +165,21 @@
     QString lname;
 
     setName( name );
+
+    // DEBUG Edit. For testing proper motion. TODO: Remove later
+    if( name == "Rigel Kentaurus" ) {
+      // Populate Trail with various positions
+        KSNumbers num( 2000.0 );
+      long double jd;
+      for( jd = 2000.0; jd <= 12000.0; jd += 500.0 ) {
+	num.updateValues( jd );
+	double ra, dec;
+	getIndexCoords( &num, &ra, &dec );
+	Trail.append( new SkyPoint( ra, dec ) );
+      }
+    }
+    // END EDIT.
+
     setName2( name2 );
 
     if ( hasName() ) {
@@ -271,12 +286,18 @@
     //    setRA0( ra0()->Hours() + pmRA()*num->julianMillenia() / (15. * cos( dec0()->radians() ) * 3600.) );
     //    setDec0( dec0()->Degrees() + pmDec()*num->julianMillenia() / 3600. );
 
-
     getIndexCoords( num, &newRA, &newDec );
     newRA /= 15.0;                           // getIndexCoords returns in Degrees, while we want the RA in Hours
     setRA0( newRA );
     setDec0( newDec );
 
+    // DEBUG Edit. For testing proper motion. TODO: Remove Later
+    KStarsData *data = KStarsData::Instance();
+    for( int i = 0; i < Trail.size(); i++ ) {
+        Trail.at( i )->EquatorialToHorizontal( data->lst(), data->geo()->lat() );
+    }
+    // END EDIT.
+
     SkyPoint::updateCoords( num );
     setRA0( saveRA );
     setDec0( saveDec );
--- branches/kstars/summer/kdeedu/kstars/kstars/starobject.h #830958:830959
@@ -337,6 +337,7 @@
 protected:
     static QMap<QString, QColor> ColorMap;
     static QHash<QString, QPixmap> StarImage;
+    QVector<SkyPoint *> Trail;
 
 private:
     char SpType[2];


More information about the Kstars-devel mailing list