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

List:       kde-commits
Subject:    branches/KDE/3.5/kdeedu/kstars/kstars
From:       Jasem Mutlaq <mutlaqja () ikarustech ! com>
Date:       2005-07-31 21:38:58
Message-ID: 1122845938.706873.24437.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 441763 by mutlaqja:

I fixed the problem of telescope crosshair centering and tracking. I
simply needed to call telescopeSkyObject->EquatorialToHorizontal() to
update the telescope skyobject internal coords. 

I also added Argo Navis to the list of supported telescopes, since the
controller was confirmed to work under KStars using the LX200 Basic
driver as report by Douglas Phillipson.

The context-menu entry for centering and tracking the telescope
crosshair was initially called "Center & Track" but I thought that might
confuse the user, he/she would think this action will somehow center and
track the telescope itself, and not simply the KStars crosshair. So I changed
it to "Center & Track Crosshair". It is more verbose, maybe too verbose
for a menu entry? But it certainly removes the ambiguity.

CCMAIL: kstars-devel@kde.org
CCMAIL: dougp@intermind.net


 M  +4 -0      indi/drivers.xml  
 M  +27 -29    indistd.cpp  
 M  +1 -1      kspopupmenu.cpp  


--- branches/KDE/3.5/kdeedu/kstars/kstars/indi/drivers.xml #441762:441763
@@ -74,6 +74,10 @@
 		<driver>skycommander</driver>
 		<version>0.1</version>
 	</device>
+	<device label="Argo Navis" focal_length="" aperture="">
+		<driver>lx200basic</driver>
+		<version>1.0</version>
+	</device>
 </devGroup>
 <devGroup group="CCDs">
 	<device label="SBIG CCD">
--- branches/KDE/3.5/kdeedu/kstars/kstars/indistd.cpp #441762:441763
@@ -73,6 +73,8 @@
    devTimer 		= new QTimer(this);
    seqLister		= new KDirLister();
    telescopeSkyObject   = new SkyObject(0, 0, 0, 0, i18n("Telescope"));
+
+   telescopeSkyObject->EquatorialToHorizontal(ksw->LST(), ksw->geo()->lat());
    
    connect( devTimer, SIGNAL(timeout()), this, SLOT(timerDone()) );
    connect( seqLister, SIGNAL(newItems (const KFileItemList & )), this, \
SLOT(checkSeqBoundary(const KFileItemList &))); @@ -223,14 +225,7 @@
    
   switch (pp->stdID)
   {
-    case EQUATORIAL_COORD:
-    case EQUATORIAL_EOD_COORD:
-    case HORIZONTAL_COORD:
-      //ksw->map()->forceUpdateNow();
-      ksw->map()->update();
-      break;
-      
-    
+
     case TIME:
       if ( Options::indiAutoTime() )
        handleDevCounter();
@@ -305,7 +300,30 @@
 	 mu = (int) el->value;
 	 CCDPreviewWindow->setCCDInfo(fwhm, mu);
 	 break;
-	
+
+       case EQUATORIAL_COORD:
+       case EQUATORIAL_EOD_COORD:
+	el = pp->findElement("RA");
+	if (!el) return;
+	telescopeSkyObject->setRA(el->value);
+	el = pp->findElement("DEC");
+	if (!el) return;
+	telescopeSkyObject->setDec(el->value);
+	telescopeSkyObject->EquatorialToHorizontal(ksw->LST(), ksw->geo()->lat());
+	ksw->map()->update();
+	break;
+
+	case HORIZONTAL_COORD:
+	el = pp->findElement("ALT");
+	if (!el) return;
+	telescopeSkyObject->setAlt(el->value);
+	el = pp->findElement("AZ");
+	if (!el) return;
+	telescopeSkyObject->setAz(el->value);
+	telescopeSkyObject->HorizontalToEquatorial(ksw->LST(), ksw->geo()->lat());
+	ksw->map()->update();
+	break;
+
     default:
         break;
 	
@@ -379,26 +397,6 @@
           CCDPreviewWindow->enableStream(false);
        break;
        
-       case EQUATORIAL_COORD:
-       case EQUATORIAL_EOD_COORD:
-	lp = pp->findElement("RA");
-	if (!lp) return;
-	telescopeSkyObject->setRA(lp->value);
-	lp = pp->findElement("DEC");
-	if (!lp) return;
-	telescopeSkyObject->setDec(lp->value);
-	//telescopeSkyObject->set(telescopeSkyObject->ra(), telescopeSkyObject->dec());
-	break;
-
-	case HORIZONTAL_COORD:
-	lp = pp->findElement("ALT");
-	if (!lp) return;
-	telescopeSkyObject->setAlt(lp->value);
-	lp = pp->findElement("AZ");
-	telescopeSkyObject->setAz(lp->value);
-        //telescopeSkyObject->set(telescopeSkyObject->ra(), \
                telescopeSkyObject->dec());
-	break;
-
     default:
       break;
     }
--- branches/KDE/3.5/kdeedu/kstars/kstars/kspopupmenu.cpp #441762:441763
@@ -210,7 +210,7 @@
 	if ( dev->findElem("RA") || dev->findElem("ALT"))
 	{
 		menuDevice->insertSeparator();
-		menuDevice->insertItem(i18n("Center Telescope"), id++);
+		menuDevice->insertItem(i18n("Center && Track Crosshair"), id++);
                 if (dev->findElem("RA"))
 			prop = dev->findElem("RA")->pp;
  		else   	


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

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