[Kstars-devel] KDE/kdeedu/kstars/kstars/skyobjects

Alexey Khudyakov alexey.skladnoy at gmail.com
Thu Jul 1 18:38:43 CEST 2010


SVN commit 1145064 by khudyakov:

Use proper formula for calculation of star's proper motion.
Formula below was used which correct for plane

 sqrt(ra^2 + dec^2)

On the sphere another one should be used

 sqrt( (cod(dec)*ra)^2 + dec^2 )

CCMAIL: kstars-devel at kde.org

 M  +2 -1      starobject.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skyobjects/starobject.cpp #1145063:1145064
@@ -422,7 +422,8 @@
 
 double StarObject::pmMagnitude()
 {
-    return sqrt( pmRA() * pmRA() + pmDec() * pmDec() );
+    double cosDec = dec().cos();
+    return sqrt( cosDec * cosDec * pmRA() * pmRA() + pmDec() * pmDec() );
 }
 
 void StarObject::JITupdate( KStarsData* data )


More information about the Kstars-devel mailing list