[Kstars-devel] [kstars] kstars/dialogs: Showing J2000.0 coordinates in the Details dialog.
Akarsh Simha
akarshsimha at gmail.com
Wed Aug 29 06:02:10 UTC 2012
Git commit 034afc3f17fb99264ef47a90b5b5169bf8134cc1 by Akarsh Simha.
Committed on 29/08/2012 at 07:57.
Pushed by asimha into branch 'master'.
Showing J2000.0 coordinates in the Details dialog.
TODO:
1. Fix bugs and make sure that we are _actually_ showing J2000.0.
We _know_ this is not the case really, as per a recent discussion
on the kstars-devel Mailing List -- some stars have catalog
coordinates from a different epoch, but we assume they are J2000.0;
This leads to visible errors in matching DSS overlays, for example
(which I think I did notice at the Texas Star Party).
2. Improve the Astroinfo article on precession, to which the J2000.0
RA and Dec labels are hyperlinked. The article on precession
doesn't talk about epochs.
CCMAIL: kstars-devel at kde.org
FEATURE: 211838
M +10 -0 kstars/dialogs/detaildialog.cpp
M +163 -91 kstars/dialogs/details_position.ui
http://commits.kde.org/kstars/034afc3f17fb99264ef47a90b5b5169bf8134cc1
diff --git a/kstars/dialogs/detaildialog.cpp b/kstars/dialogs/detaildialog.cpp
index 2dc4343..c86dd1c 100644
--- a/kstars/dialogs/detaildialog.cpp
+++ b/kstars/dialogs/detaildialog.cpp
@@ -457,6 +457,16 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo
a = selectedObject->altRefracted();
Pos->Alt->setText( a.toDMSString() );
+ // Display the RA0 and Dec0 for objects that are outside the solar system
+ if( !selectedObject->isSolarSystem() ) {
+ Pos->RA0->setText( selectedObject->ra0().toHMSString() );
+ Pos->Dec0->setText( selectedObject->dec0().toDMSString() );
+ }
+ else {
+ Pos->RA0->setText( "--" );
+ Pos->Dec0->setText( "--" );
+ }
+
//Hour Angle can be negative, but dms HMS expressions cannot.
//Here's a kludgy workaround:
dms lst = geo->GSTtoLST( ut.gst() );
diff --git a/kstars/dialogs/details_position.ui b/kstars/dialogs/details_position.ui
index c53b38c..c9f4de7 100644
--- a/kstars/dialogs/details_position.ui
+++ b/kstars/dialogs/details_position.ui
@@ -87,30 +87,26 @@
<property name="spacing">
<number>6</number>
</property>
- <item row="0" column="0">
- <widget class="KSHelpLabel" name="RALabel">
- <property name="lineWidth">
- <number>2</number>
+ <item row="1" column="1">
+ <widget class="QLabel" name="Dec">
+ <property name="font">
+ <font>
+ <family>Monospace</family>
+ <pointsize>10</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
</property>
<property name="text">
- <string>RA (2000.0):</string>
- </property>
- <property name="anchor" stdset="0">
- <string>skycoords</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignTop</set>
- </property>
- <property name="margin">
- <number>1</number>
+ <string>00:00:00</string>
</property>
- <property name="openExternalLinks">
- <bool>false</bool>
+ <property name="textInteractionFlags">
+ <set>Qt::TextSelectableByKeyboard</set>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QLabel" name="RA">
+ <item row="0" column="4">
+ <widget class="QLabel" name="Az">
<property name="font">
<font>
<family>Monospace</family>
@@ -143,6 +139,28 @@
</property>
</spacer>
</item>
+ <item row="1" column="0">
+ <widget class="KSHelpLabel" name="DecLabel">
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="text">
+ <string>Dec (2000.0):</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignTop</set>
+ </property>
+ <property name="margin">
+ <number>1</number>
+ </property>
+ <property name="openExternalLinks">
+ <bool>false</bool>
+ </property>
+ <property name="anchor" stdset="0">
+ <string>skycoords</string>
+ </property>
+ </widget>
+ </item>
<item row="0" column="3">
<widget class="KSHelpLabel" name="AzLabel">
<property name="lineWidth">
@@ -151,9 +169,6 @@
<property name="text">
<string>Azimuth:</string>
</property>
- <property name="anchor" stdset="0">
- <string>skycoords</string>
- </property>
<property name="alignment">
<set>Qt::AlignTop</set>
</property>
@@ -163,10 +178,13 @@
<property name="openExternalLinks">
<bool>false</bool>
</property>
+ <property name="anchor" stdset="0">
+ <string>skycoords</string>
+ </property>
</widget>
</item>
- <item row="0" column="4">
- <widget class="QLabel" name="Az">
+ <item row="0" column="1">
+ <widget class="QLabel" name="RA">
<property name="font">
<font>
<family>Monospace</family>
@@ -183,16 +201,13 @@
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="KSHelpLabel" name="DecLabel">
+ <item row="0" column="0">
+ <widget class="KSHelpLabel" name="RALabel">
<property name="lineWidth">
<number>2</number>
</property>
<property name="text">
- <string>Dec (2000.0):</string>
- </property>
- <property name="anchor" stdset="0">
- <string>skycoords</string>
+ <string>RA (2000.0):</string>
</property>
<property name="alignment">
<set>Qt::AlignTop</set>
@@ -203,10 +218,29 @@
<property name="openExternalLinks">
<bool>false</bool>
</property>
+ <property name="anchor" stdset="0">
+ <string>skycoords</string>
+ </property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLabel" name="Dec">
+ <item row="4" column="3">
+ <widget class="QLabel" name="AirmassLabel">
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="text">
+ <string>Airmass:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignTop</set>
+ </property>
+ <property name="margin">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="4">
+ <widget class="QLabel" name="Airmass">
<property name="font">
<font>
<family>Monospace</family>
@@ -216,26 +250,13 @@
</font>
</property>
<property name="text">
- <string>00:00:00</string>
+ <string>0.00</string>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard</set>
</property>
</widget>
</item>
- <item row="1" column="2">
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>101</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
<item row="1" column="3">
<widget class="KSHelpLabel" name="AltLabel">
<property name="lineWidth">
@@ -244,9 +265,6 @@
<property name="text">
<string>Altitude:</string>
</property>
- <property name="anchor" stdset="0">
- <string>skycoords</string>
- </property>
<property name="alignment">
<set>Qt::AlignTop</set>
</property>
@@ -256,10 +274,13 @@
<property name="openExternalLinks">
<bool>false</bool>
</property>
+ <property name="anchor" stdset="0">
+ <string>skycoords</string>
+ </property>
</widget>
</item>
- <item row="1" column="4">
- <widget class="QLabel" name="Alt">
+ <item row="3" column="4">
+ <widget class="QLabel" name="HA">
<property name="font">
<font>
<family>Monospace</family>
@@ -276,20 +297,25 @@
</property>
</widget>
</item>
- <item row="2" column="0" colspan="5">
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <item row="1" column="4">
+ <widget class="QLabel" name="Alt">
+ <property name="font">
+ <font>
+ <family>Monospace</family>
+ <pointsize>10</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>441</width>
- <height>20</height>
- </size>
+ <property name="text">
+ <string>00:00:00</string>
</property>
- </spacer>
+ <property name="textInteractionFlags">
+ <set>Qt::TextSelectableByKeyboard</set>
+ </property>
+ </widget>
</item>
- <item row="3" column="0">
+ <item row="3" column="3">
<widget class="KSHelpLabel" name="HALabel">
<property name="lineWidth">
<number>2</number>
@@ -297,9 +323,6 @@
<property name="text">
<string>Hour angle:</string>
</property>
- <property name="anchor" stdset="0">
- <string>hourangle</string>
- </property>
<property name="alignment">
<set>Qt::AlignTop</set>
</property>
@@ -309,25 +332,36 @@
<property name="openExternalLinks">
<bool>false</bool>
</property>
+ <property name="anchor" stdset="0">
+ <string>hourangle</string>
+ </property>
</widget>
</item>
- <item row="3" column="1">
- <widget class="QLabel" name="HA">
- <property name="font">
- <font>
- <family>Monospace</family>
- <pointsize>10</pointsize>
- <weight>75</weight>
- <bold>true</bold>
- </font>
+ <item row="1" column="2">
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="text">
- <string>00:00:00</string>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>101</width>
+ <height>20</height>
+ </size>
</property>
- <property name="textInteractionFlags">
- <set>Qt::TextSelectableByKeyboard</set>
+ </spacer>
+ </item>
+ <item row="2" column="0" colspan="5">
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- </widget>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>441</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
</item>
<item row="3" column="2">
<spacer>
@@ -345,24 +379,36 @@
</property>
</spacer>
</item>
- <item row="3" column="3">
- <widget class="QLabel" name="AirmassLabel">
- <property name="lineWidth">
- <number>2</number>
- </property>
+ <item row="3" column="0">
+ <widget class="KSHelpLabel" name="RA0Label">
<property name="text">
- <string>Airmass:</string>
+ <string>RA (J2000.0):</string>
</property>
- <property name="alignment">
- <set>Qt::AlignTop</set>
+ <property name="anchor" stdset="0">
+ <string>precession</string>
</property>
- <property name="margin">
- <number>1</number>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLabel" name="RA0">
+ <property name="font">
+ <font>
+ <family>Monospace</family>
+ <pointsize>10</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>00:00:00</string>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::TextSelectableByKeyboard</set>
</property>
</widget>
</item>
- <item row="3" column="4">
- <widget class="QLabel" name="Airmass">
+ <item row="4" column="1">
+ <widget class="QLabel" name="Dec0">
<property name="font">
<font>
<family>Monospace</family>
@@ -372,13 +418,39 @@
</font>
</property>
<property name="text">
- <string>0.00</string>
+ <string>00:00:00</string>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard</set>
</property>
</widget>
</item>
+ <item row="4" column="0">
+ <widget class="KSHelpLabel" name="Dec0Label">
+ <property name="text">
+ <string>Dec (J2000.0):</string>
+ </property>
+ <property name="anchor" stdset="0">
+ <string>precession</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <spacer name="spacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>81</width>
+ <height>24</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</item>
<item>
More information about the Kstars-devel
mailing list