[Kstars-devel] kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Thu Jul 1 20:34:23 CEST 2004


CVS commit by harris: 

Fix to manual focus tool.  The final focus position was slightly offset 
from the requested position, because the recentering process calls 
EquatorialToHorizontal() near the end of the slew when the LST has 
changed slightly.  Added a corrective recentering to the exact requested 
position to slotManualFocus().

CCMAIL: kstars-devel at kde.org


  M +10 -3     kstarsactions.cpp   1.113
  M +11 -8     skymap.cpp   1.140


--- kdeedu/kstars/kstars/kstarsactions.cpp  #1.112:1.113
@@ -607,7 +607,7 @@ void KStars::slotManualFocus() {
                 //If we are correcting for atmospheric refraction, correct the coordinates for that effect
                 if ( Options::useAltAz() && Options::useRefraction() ) {
-                        focusDialog.point()->EquatorialToHorizontal( LST(), geo()->lat() );
-                        focusDialog.point()->setAlt( map()->refract( focusDialog.point()->alt(), true ) );
-                        focusDialog.point()->HorizontalToEquatorial( LST(), geo()->lat() );
+//                      focusDialog.point()->EquatorialToHorizontal( LST(), geo()->lat() );
+//                      focusDialog.point()->setAlt( map()->refract( focusDialog.point()->alt(), true ) );
+//                      focusDialog.point()->HorizontalToEquatorial( LST(), geo()->lat() );
                 }
 
@@ -617,4 +617,11 @@ void KStars::slotManualFocus() {
                 map()->slotCenter();
 
+                //The slew takes some time to complete, and this often causes the final focus point to be slightly 
+                //offset from the user's requested coordinates (because EquatorialToHorizontal() is called 
+                //throughout the process, which depends on the sidereal time).  So we now "polish" the final
+                //position by resetting the final focus to the focusDialog point:
+                data()->setSnapNextFocus();
+                map()->setDestinationAltAz( focusDialog.point()->alt()->Degrees(), focusDialog.point()->az()->Degrees() );
+                
                 //Don't track if we set Alt/Az coordinates.  This way, Alt/Az remain constant.
                 if ( focusDialog.usedAltAz() ) map()->stopTracking();

--- kdeedu/kstars/kstars/skymap.cpp  #1.139:1.140
@@ -513,14 +513,17 @@ void SkyMap::slotCenter( void ) {
 
         //update the destination to the selected coordinates
-        if ( Options::useAltAz() && Options::useRefraction() ) { //correct for atmospheric refraction if using horizontal coords
-                setDestinationAltAz( refract( focusPoint()->alt(), true ).Degrees(), focusPoint()->az()->Degrees() );
-        } else {
+//      if ( Options::useAltAz() && Options::useRefraction() ) { //correct for atmospheric refraction if using horizontal coords
+//              setDestinationAltAz( refract( focusPoint()->alt(), true ).Degrees(), focusPoint()->az()->Degrees() );
+//      } else {
                 setDestination( focusPoint() );
-                destination()->EquatorialToHorizontal( data->LST, data->geo()->lat() );
-        }
+//      }
 
         //display coordinates in statusBar
-        QString s = focusPoint()->ra()->toHMSString() + ",  " + focusPoint()->dec()->toDMSString(true);
-        if ( ksw ) ksw->statusBar()->changeItem( s, 1 );
+        if ( ksw ) {
+                QString s = focusPoint()->az()->toDMSString() + ",  " + focusPoint()->alt()->toDMSString(true);
+                ksw->statusBar()->changeItem( s, 1 );
+                s = focusPoint()->ra()->toHMSString() + ",  " + focusPoint()->dec()->toDMSString(true);
+                ksw->statusBar()->changeItem( s, 2 );
+        }
 
         showFocusCoords(); //update FocusBox




More information about the Kstars-devel mailing list