[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kstars-devel
Subject:    [Kstars-devel] provide equatorial coordinates also for epoch J2000.0
From:       Lukas Middendorf <lukas.middendorf () freenet ! de>
Date:       2009-12-10 23:18:58
Message-ID: 200912110018.58162.lukas.middendorf () freenet ! de
[Download RAW message or body]

Hi,

I have added the equatorial coordinates for epoch J2000.0 to the Focus Box. 
Are there any objections against such a patch?
Is there any nicer way to detect solar system objects, that do not have ra0 
and dec0 set (and for which the additional coordinates would not make sense) 
instead of just checking for (0,0)?

Regards,
Lukas

["infobox_J2000_0.diff" (text/x-patch)]

Index: kstars/widgets/infoboxwidget.cpp
===================================================================
--- kstars/widgets/infoboxwidget.cpp	(revision 1061174)
+++ kstars/widgets/infoboxwidget.cpp	(working copy)
@@ -120,11 +120,20 @@
 }
 
 void InfoBoxWidget::setPoint(QString name, SkyPoint* p) {
+	//Don't use KLocale::formatNumber() for the epoch string,
+    //because we don't want a thousands-place separator!
+    QString sEpoch = QString::number( KStarsData::Instance()->ut().epoch(), 'f', 1 \
); +
     m_strings.clear();
     m_strings << name;
+    if(p->ra0()->Degrees() !=0 && p->dec0()->Degrees() !=0 && name!=i18n("nothing")) \
{ //not when no object is selected and when ra0 und dec0 are not set +		m_strings <<
+			i18nc( "Right Ascension", "RA" ) + " (" + "2000.0" + "): " + \
p->ra0()->toHMSString() + "  " + +			i18nc( "Declination", "Dec" )    + " (" + \
"2000.0" + "): " + p->dec0()->toDMSString(true); +    }
     m_strings <<
-        i18nc( "Right Ascension", "RA" ) + ": " + p->ra()->toHMSString() + "  " +
-        i18nc( "Declination", "Dec" )    + ": " + p->dec()->toDMSString(true);
+        i18nc( "Right Ascension", "RA" ) + " (" + sEpoch + "): " + \
p->ra()->toHMSString() + "  " + +        i18nc( "Declination", "Dec" )    + " (" + \
sEpoch + "): " + p->dec()->toDMSString(true);  m_strings <<
         i18nc( "Azimuth", "Az" )   + ": " + p->az()->toDMSString(true) + "  " +
         i18nc( "Altitude", "Alt" ) + ": " + p->alt()->toDMSString(true);



_______________________________________________
Kstars-devel mailing list
Kstars-devel@kde.org
https://mail.kde.org/mailman/listinfo/kstars-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic