[Kstars-devel] [kstars] kstars/skyobjects: For USNO NOMAD catalog stars, the maximum proper motion is of the

Akarsh Simha akarshsimha at gmail.com
Sun Jul 17 07:33:50 CEST 2011


Git commit 0d47b3365e09a4146dc8fc01592fcfdebe595c0d by Akarsh Simha.
Committed on 17/07/2011 at 07:25.
Pushed by asimha into branch 'master'.

For USNO NOMAD catalog stars, the maximum proper motion is of the
order of 2 arcseconds per millenium. Most of the times, we're running
the simulation at the current time, which is not further than a few
decades from the epoch. So the proper motion corrections for all USNO
NOMAD stars is less than an arcsecond. The error in cataloged
coordinates is probably this large anyway. By ignoring the proper
motion corrections when the proper motion distance is less than 1
arcsecond, we save a good deal of computation time, as is shown by
cache profiling.

CCMAIL: kstars-devel at kde.org

M  +8    -0    kstars/skyobjects/starobject.cpp

http://commits.kde.org/kstars/0d47b3365e09a4146dc8fc01592fcfdebe595c0d

diff --git a/kstars/skyobjects/starobject.cpp b/kstars/skyobjects/starobject.cpp
index 9354da3..1cecccb 100644
--- a/kstars/skyobjects/starobject.cpp
+++ b/kstars/skyobjects/starobject.cpp
@@ -280,6 +280,14 @@ void StarObject::getIndexCoords( KSNumbers *num, double *ra, double *dec )
     // PM times the number of Julian millenia since J2000.0
 
     double pm = pmMagnitude() * num->julianMillenia();   // Proper Motion in arcseconds
+
+    if( pm < 1. ) {
+        // Ignore corrections
+        *ra = ra0().Degrees();
+        *dec = dec0().Degrees();
+        return;
+    }
+
     double dir0 = ( pm > 0 ) ? atan2( pmRA(), pmDec() ) : atan2( -pmRA(), -pmDec() );  // Bearing, in radian
 
     ( pm < 0 ) && ( pm = -pm );


More information about the Kstars-devel mailing list