[Kstars-devel] [kstars] kstars/skyobjects: PM in RA and Dec are essentially derivatives of the RA and Dec taken

Akarsh Simha akarsh.simha at kdemail.net
Sun Mar 17 08:34:27 UTC 2013


Git commit aa715a68735d5d4f77618115aa1b7236e5bfc215 by Akarsh Simha.
Committed on 17/03/2013 at 04:09.
Pushed by asimha into branch 'master'.

PM in RA and Dec are essentially derivatives of the RA and Dec taken
in the J2000.0 reference frame (hopefully). Even otherwise, the
difference should be small (and "second order"). One must however be
aware that this kind of a difference does accumulate over time, but it
should still be okay.

However, sometimes, this method is called before dec() is actually
computed! So, replacing dec() by dec0().

Should backport to 4.10, master.

CCMAIL: kstars-devel at kde.org
(cherry picked from commit 98eac0c523cc25203365af953f08ba7970c9762a)

M  +2    -2    kstars/skyobjects/starobject.h

http://commits.kde.org/kstars/aa715a68735d5d4f77618115aa1b7236e5bfc215

diff --git a/kstars/skyobjects/starobject.h b/kstars/skyobjects/starobject.h
index 542383d..6a8f01e 100644
--- a/kstars/skyobjects/starobject.h
+++ b/kstars/skyobjects/starobject.h
@@ -179,7 +179,7 @@ public:
     /**@short returns the magnitude of the proper motion correction in milliarcsec/year */
     inline double pmMagnitude()
     {
-        double cosDec = dec().cos();
+        double cosDec = dec0().cos();
         return sqrt( cosDec * cosDec * pmRA() * pmRA() + pmDec() * pmDec() );
     }
 
@@ -189,7 +189,7 @@ public:
      */
     inline double pmMagnitudeSquared()
     {
-        double metric_weighted_pmRA = dec().cos() * pmRA();
+        double metric_weighted_pmRA = dec0().cos() * pmRA();
         return (metric_weighted_pmRA * metric_weighted_pmRA + pmDec() * pmDec());
     }
 


More information about the Kstars-devel mailing list