[Kstars-devel] [kstars] kstars: Adding an "eyepiece view" feature to the observation planner

Akarsh Simha akarsh.simha at kdemail.net
Tue Jun 3 17:33:56 UTC 2014


Git commit a116aea67121fea1bbb661eefe14116b89f4841b by Akarsh Simha.
Committed on 31/05/2014 at 00:44.
Pushed by asimha into branch 'master'.

Adding an "eyepiece view" feature to the observation planner

This is a very beta feature at the moment. It renders a view of the
eyepiece and DSS / other imagery if available, side-by-side. The view
can be rotated, flipped and inverted to help match the view through a
telescope / camera.

The DSS image and the sky map view are oriented correctly only when
using equatorial coordinates. One needs to work out some (presumably
well-known, standard) trigonometry to rotate the DSS in horizontal
coordinates.

The feature is very buggy, but works. Will polish it if and when I
have the time. Please feel free to contribute.

FEATURE
CCMAIL: kstars-devel at kde.org

M  +1    -0    kstars/CMakeLists.txt
M  +2    -0    kstars/obslistpopupmenu.cpp
M  +8    -1    kstars/tools/observinglist.cpp
M  +7    -0    kstars/tools/observinglist.h

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

diff --git a/kstars/CMakeLists.txt b/kstars/CMakeLists.txt
index ad031f4..8797a48 100644
--- a/kstars/CMakeLists.txt
+++ b/kstars/CMakeLists.txt
@@ -169,6 +169,7 @@ set(libkstarstools_SRCS
 	tools/flagmanager.cpp
 	tools/moonphasetool.cpp
 	tools/starhopper.cpp
+	tools/eyepiecefield.cpp
 	)
 
 kde4_add_ui_files(libkstarstools_SRCS
diff --git a/kstars/obslistpopupmenu.cpp b/kstars/obslistpopupmenu.cpp
index d4945ef..e85cb57 100644
--- a/kstars/obslistpopupmenu.cpp
+++ b/kstars/obslistpopupmenu.cpp
@@ -61,6 +61,8 @@ void ObsListPopupMenu::initPopupMenu( bool showAddToSession,
         addAction( i18nc( "Show Detailed Information Dialog", "Details" ), ks->observingList(), SLOT( slotDetails() ) );
     //Insert item for opening the Altitude vs time dialog
     addAction( i18n( "Altitude vs. Time" ), ks->observingList(), SLOT( slotAVT() ) );
+    // Insert item for opening the eyepiece view tool
+    addAction( i18n( "Eyepiece view (Beta)" ), ks->observingList(), SLOT( slotEyepieceView() ) );
     addSeparator();
     //Insert item for dowloading different images
     if( showLinks ) {
diff --git a/kstars/tools/observinglist.cpp b/kstars/tools/observinglist.cpp
index 4ada40e..2eb81ea 100644
--- a/kstars/tools/observinglist.cpp
+++ b/kstars/tools/observinglist.cpp
@@ -66,6 +66,7 @@
 #include "oal/log.h"
 #include "oal/oal.h"
 #include "oal/execute.h"
+#include "tools/eyepiecefield.h"
 
 #include <config-kstars.h>
 
@@ -89,7 +90,7 @@ ObservingListUI::ObservingListUI( QWidget *p ) : QFrame( p ) {
 ObservingList::ObservingList( KStars *_ks )
         : KDialog( (QWidget*)_ks ),
         ks( _ks ), LogObject(0), m_CurrentObject(0),
-        isModified(false), bIsLarge(true)
+          isModified(false), bIsLarge(true), m_epf( 0 )
 {
     ui = new ObservingListUI( this );
     setMainWidget( ui );
@@ -678,6 +679,12 @@ void ObservingList::slotFind() {
    delete fd;
 }
 
+void ObservingList::slotEyepieceView() {
+    if( !m_epf )
+        m_epf = new EyepieceField( this );
+    m_epf->showEyepieceField( currentObject(), 0, CurrentImagePath ); // FIXME: Use FOV symbols etc.
+}
+
 void ObservingList::slotAVT() {
     QModelIndexList selectedItems;
     // TODO: Think and see if there's a more effecient way to do this. I can't seem to think of any, but this code looks like it could be improved. - Akarsh
diff --git a/kstars/tools/observinglist.h b/kstars/tools/observinglist.h
index bb7e385..79d33e6 100644
--- a/kstars/tools/observinglist.h
+++ b/kstars/tools/observinglist.h
@@ -35,6 +35,7 @@ class QStandardItemModel;
 class KStars;
 class KStarsDateTime;
 class GeoLocation;
+class EyepieceField;
 
 
 class ObservingListUI : public QFrame, public Ui::ObservingList {
@@ -330,6 +331,11 @@ public slots:
 
     void slotAddVisibleObj();
 
+    /**
+     * @short Show the eyepiece field view
+     */
+    void slotEyepieceView();
+
 
 protected slots:
     void slotClose();
@@ -351,6 +357,7 @@ private:
     QHash<QString, QTime> TimeHash; 
     QList<QString> ImageList;
     ObsListPopupMenu *pmenu; 
+    EyepieceField *m_epf;
 };
 
 #endif // OBSERVINGLIST_H_


More information about the Kstars-devel mailing list