Index: trunk/MagicSoft/Cosy/main/MSlewing.cc
===================================================================
--- trunk/MagicSoft/Cosy/main/MSlewing.cc	(revision 8821)
+++ trunk/MagicSoft/Cosy/main/MSlewing.cc	(revision 8824)
@@ -1,3 +1,5 @@
 #include "MSlewing.h"
+
+#include "MLogManip.h"
 
 #include "MCosy.h"
@@ -103,5 +105,5 @@
 
     MTime t(-1);
-    gLog << t << " - Target Position: " << d.Zd() << "deg, " << d.Az() << "deg (Zd/Az)" << endl;
+    gLog << all << t << " - Target Position: " << d.Zd() << "deg, " << d.Az() << "deg (Zd/Az)" << endl;
 
     //
@@ -150,5 +152,5 @@
     {
 
-        gLog << "- Step #" << i << endl;
+        gLog << inf2 << "- Step #" << i << endl;
 
         // Get Shaft Encoder Positions
@@ -173,5 +175,5 @@
         {
             t.Now();
-            gLog << t << " - Positioning done in " << i << (i==1?" step.":" steps.") << endl;
+            gLog << all << t << " - Positioning done in " << i << (i==1?" step.":" steps.") << endl;
             fCosy->SetStatus(MDriveCom::kStopped);
             fCosy->fCom->SendStatus("Target position reached.");
@@ -191,5 +193,6 @@
 
         // change units from se to re
-        rd *= fCosy->kGearTot/fCosy->kResSE; // [re]
+//        rd *= fCosy->kGearTot/fCosy->kResSE; // [re]
+        rd *= Div(fCosy->kGearTot,fCosy->kResSE); // [re]
         rd.Zd(f2-f1);
 
@@ -245,12 +248,12 @@
 
         // repositioning (relative)
-        gLog << "- Do Relative Positioning..." << endl;
+        gLog << inf2 << "- Do Relative Positioning..." << endl;
         DoRelPos(rd, cdzd, cdaz);
-        gLog << "- Relative Positioning Done" << endl;
+        gLog << inf2 << "- Relative Positioning Done" << endl;
     }
     if (i==1 && track && !Break()/*(fCosy->Break() || fCosy->HasError() || fCosy->HasZombie())*/)
     {
         t.Now();
-        gLog << t << " - Positioning done." << endl;
+        gLog << all << t << " - Positioning done." << endl;
         fCosy->SetStatus(MDriveCom::kStopped);
         fCosy->fCom->SendStatus("Tracking preposition reached.");
@@ -264,5 +267,5 @@
 
     t.Now();
-    gLog << t << " - Warning: Requested position not reached (i=" << dec << i << ")" << endl;
+    gLog << warn << t << " - Warning: Requested position not reached (i=" << dec << i << ")" << endl;
 
     fCosy->fCom->SendStatus("Target position missed!");
Index: trunk/MagicSoft/Cosy/main/MStarguider.cc
===================================================================
--- trunk/MagicSoft/Cosy/main/MStarguider.cc	(revision 8821)
+++ trunk/MagicSoft/Cosy/main/MStarguider.cc	(revision 8824)
@@ -248,16 +248,8 @@
     fCaosAnalyse->AddEntry("St&op Analysis",  IDM_kCaosAnalStop);
     fCaosAnalyse->DisableEntry(IDM_kCaosAnalStop);
-    //    fCaosAnalyse->AddEntry("&Reset Histograms", IDM_kResetHistograms);
-    //    fCaosAnalyse->AddEntry("Reset &Graph", IDM_kResetGraph);
     fCaosAnalyse->Associate(this);
     fList->Add(fCaosAnalyse);
 
     fMenu = new TGMenuBar(this, 0, 0, kHorizontalFrame);
-    //fMenu->SetCleanup();
-    //fMenu->AddPopup("&Display",    fDisplay,         NULL);
-    //fMenu->AddPopup("&Mode",       fMode,            NULL);
-    //fMenu->AddPopup("&WritePics",  fWritePictures,   NULL);
-    //fMenu->AddPopup("&Setup",      fSetup,           NULL);
-    //fMenu->AddPopup("&Operations", fOperations,      NULL);
     fDisplay       = fMenu->AddPopup("&Display");
     fMode          = fMenu->AddPopup("&Mode");
@@ -266,7 +258,5 @@
     fOperations    = fMenu->AddPopup("&Operations");
     fMenu->Resize(fMenu->GetDefaultSize());
-    //fMenu->BindKeys(this);
     AddFrame(fMenu); 
-    //fList->Add(fMenu);
 
     //
@@ -290,13 +280,9 @@
     fDisplay->CheckEntry(IDM_kStretch);
     fDisplay->Associate(this);
-    //fList->Add(fDisplay);
-
-    //fMode = new MGPopupMenu(p);
+
     fMode->AddEntry("Starguider", IDM_kStarguiderMode);
     fMode->AddEntry("Tpoint",     IDM_kTpointMode);
     fMode->Associate(this);
-    //fList->Add(fMode);
-
-    //fWritePictures = new MGPopupMenu(p);
+
     fWritePictures->AddEntry("&Start",      IDM_kStart);
     fWritePictures->AddEntry("Sto&p",       IDM_kStop);
@@ -307,19 +293,13 @@
     fWritePictures->DisableEntry(IDM_kStop);
     fWritePictures->Associate(this);
-    //fList->Add(fWritePictures);
-
-    //fSetup = new MGPopupMenu(p);
+
     fSetup->AddPopup("Lim. &Magnitude",      fLimMag);
     fSetup->AddPopup("Disp. &Interpolation", fInterpol);
-    //fSetup->AddEntry("Use Ra/Dec from file", IDM_kUseFileRaDec);
     fSetup->Associate(this);
-    //fList->Add(fSetup);
-
-    //fOperations = new MGPopupMenu(p);
+
     fOperations->AddEntry("Roque Lamp Analysis", IDM_kRoqueLampAna);
     fOperations->AddEntry("Starguider Analysis", IDM_kStargAnalysis);
     fOperations->DisableEntry(IDM_kStargAnalysis);
     fOperations->Associate(this);
-    //fList->Add(fOperations);
 
     fCaOs = new TGPopupMenu(p);
@@ -328,12 +308,6 @@
     fCaOs->AddPopup("&Analyse", fCaosAnalyse);
     fCaOs->Associate(this);
-    //fCaOs->BindKeys(fMenu, this);
     fList->Add(fCaOs);
-/*
-    TGLayoutHints *hints2a = 
-	new TGLayoutHints(kLHintsCenterX|kLHintsCenterY|
-        		  kLHintsExpandX|kLHintsExpandY,1,1);
-    fList->Add(hints2a);
- */
+
     fGStarg = new MGStarg(this, 235);
     fGStarg->DrawText("0.75'", "1.50'", "3.00'", "Mispointing [min]");
@@ -346,5 +320,4 @@
     fCRaDec->Move(4, fMenu->GetDefaultHeight()+584);
     AddFrame(fCRaDec);
-    //fList->Add(fCRaDec);
 
     //telescope position
@@ -352,5 +325,4 @@
     fCZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+597);
     AddFrame(fCZdAz);
-    //fList->Add(fCZdAz);
 
     //starguider position
@@ -358,5 +330,4 @@
     fPZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+640);
     AddFrame(fPZdAz);
-    //fList->Add(fPZdAz);
 
     //mispointing
@@ -364,10 +335,8 @@
     fDZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+683);
     AddFrame(fDZdAz);
-    //fList->Add(fDZdAz);
 
     fSZdAz = new MGCoordinates(this, kETypeZdAz, 2);
     fSZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+795);
     AddFrame(fSZdAz);
-    //fList->Add(fSZdAz);
 
     fGNumStars = new MGNumStars(this, 235);
@@ -380,5 +349,4 @@
     fTPoint->AllowStayDown(kTRUE);
     AddFrame(fTPoint);
-    //fList->Add(fTPoint);
 
     fStargTPoint = new TGTextButton(this, "StargTPoint");
@@ -386,5 +354,4 @@
     fStargTPoint->AllowStayDown(kTRUE);
     AddFrame(fStargTPoint);
-    //fList->Add(fStargTPoint);
 
     fFps = new TGLabel(this, "---fps");
@@ -392,5 +359,4 @@
     fFps->Move(650-495, fMenu->GetDefaultHeight()+714+23);
     AddFrame(fFps);
-    //fList->Add(fFps);
 
     fPosZoom = new TGLabel(this, "(----, ----) ----.--d/----.--d");
@@ -398,5 +364,4 @@
     fPosZoom->Move(4, fMenu->GetDefaultHeight()+765);
     AddFrame(fPosZoom);
-    //fList->Add(fPosZoom);
 
     fSkyBright = new TGLabel(this, "Sky Brightness: ---         ");
@@ -404,5 +369,4 @@
     fSkyBright->Move(4, fMenu->GetDefaultHeight()+785);
     AddFrame(fSkyBright);
-    //fList->Add(fSkyBright);
 
     TGLabel *l = new TGLabel(this, "deg");
@@ -410,5 +374,4 @@
     l->Move(606-412, fMenu->GetDefaultHeight()+669);
     AddFrame(l);
-    //fList->Add(l);
 
     l = new TGLabel(this, "arcsec/pix");
@@ -416,5 +379,4 @@
     l->Move(606-412, fMenu->GetDefaultHeight()+692);
     AddFrame(l);
-    //fList->Add(l);
 
     l = new TGLabel(this, "sigma");
@@ -422,5 +384,4 @@
     l->Move(606-412, fMenu->GetDefaultHeight()+715);
     AddFrame(l);
-    //fList->Add(l);
 
     fCZdAzText = new TGLabel(this, "Zd/Az telescope pointing at");
@@ -428,5 +389,4 @@
     fCZdAzText->Move(240+12+20+7, fMenu->GetDefaultHeight()+584-5);
     AddFrame(fCZdAzText);
-    //fList->Add(fCZdAzText);
 
     fPZdAzText = new TGLabel(this, "Zd/Az starguider pointing at");
@@ -434,5 +394,4 @@
     fPZdAzText->Move(240+12+20+7, fMenu->GetDefaultHeight()+630+20-5-23);
     AddFrame(fPZdAzText);
-    //fList->Add(fPZdAzText);
 
     fDZdAzText = new TGLabel(this, "Zd/Az mispointing");
@@ -440,5 +399,4 @@
     fDZdAzText->Move(240+12+20+7, fMenu->GetDefaultHeight()+676+2*20-5-46);
     AddFrame(fDZdAzText);
-    //fList->Add(fDZdAzText);
 
 #ifdef EXPERT
@@ -447,5 +405,4 @@
     l->Move(240+12+20, fMenu->GetDefaultHeight()+722+3*20-5);
     AddFrame(l);
-    //fList->Add(l);
 #endif
 
@@ -453,5 +410,5 @@
     const Double_t angle = -0.2;
     fSao->SetRotationAngle(angle);
-    
+
     TString txt;
     txt += angle;
@@ -461,5 +418,4 @@
     fAngle->Move(547-410, fMenu->GetDefaultHeight()+667);
     AddFrame(fAngle);
-    //fList->Add(fAngle);
 
     // Set input box for pixel size
@@ -475,5 +431,4 @@
     fPixSize->Move(547-410, fMenu->GetDefaultHeight()+690);
     AddFrame(fPixSize);
-    //fList->Add(fPixSize);
 
     // Set input box for cleaning cut
@@ -487,5 +442,4 @@
     fCut->Move(547-410, fMenu->GetDefaultHeight()+713);
     AddFrame(fCut);
-    //fList->Add(fCut);
 
     // TGHorizontal3DLine *fLineSep = new TGHorizontal3DLine(this);
@@ -500,10 +454,8 @@
     fZoomImage->Move(4, 700-kZOOM-2+85);
     AddFrame(fZoomImage);
-    //fList->Add(fZoomImage);
 
     fImage = new MGImage(this, 768, 576);
     fImage->Move(0, fMenu->GetDefaultHeight());
     AddFrame(fImage);
-    //fList->Add(fImage);
 
     const Int_t w = 768;
@@ -1863,5 +1815,5 @@
 	    for (int x=0; x<768/2-1; x++)
 		simg[x+y*(768/2-1)] = ((unsigned int)img[2*x+2*y*768]+img[2*x+2*y*768+1]+img[2*x+2*(y+1)*768]+img[2*x+2*(y+1)*768+1])/4;	
-	
+
 	fCosy->GetWin()->GetImage()->DrawImg(simg);
     }
