Index: trunk/MagicSoft/Cosy/Changelog
===================================================================
--- trunk/MagicSoft/Cosy/Changelog	(revision 9553)
+++ trunk/MagicSoft/Cosy/Changelog	(revision 9554)
@@ -4,7 +4,12 @@
    * main/MMoonPointing.h:
      - changed comment
+     - added a few sanity checks to avoid unnecessary calculations
 
    * main/MTracking.[h,cc]:
      - changed internal units of offsets to rad
+     - interpret result of moon.CalcPosition correctly
+
+   * catalog/SlaStars.[h,cc]:
+     - removed obsolete ApplyOffset
 
 
Index: trunk/MagicSoft/Cosy/catalog/SlaStars.cc
===================================================================
--- trunk/MagicSoft/Cosy/catalog/SlaStars.cc	(revision 9553)
+++ trunk/MagicSoft/Cosy/catalog/SlaStars.cc	(revision 9554)
@@ -21,10 +21,4 @@
 {
     fAltAz = AltAz(TMath::Pi()/2-zdaz.Zd(), zdaz.Az()) * TMath::DegToRad();
-    fRaDec = CalcRaDec(fAltAz);
-}
-
-void SlaStars::ApplyOffsetAltAz(const AltAz &offset)
-{
-    fAltAz += offset;
     fRaDec = CalcRaDec(fAltAz);
 }
Index: trunk/MagicSoft/Cosy/catalog/SlaStars.h
===================================================================
--- trunk/MagicSoft/Cosy/catalog/SlaStars.h	(revision 9553)
+++ trunk/MagicSoft/Cosy/catalog/SlaStars.h	(revision 9554)
@@ -61,7 +61,4 @@
     ZdAz   CalcZdAzFast (const RaDec &radec) const;
 
-    void   ApplyOffsetAltAz(const AltAz &offset);
-    void   ApplyOffsetZdAz(const ZdAz &offset) { ApplyOffsetAltAz(AltAz(-offset.Zd(), offset.Az())); }
-
     ClassDef(SlaStars, 0)
 };
Index: trunk/MagicSoft/Cosy/main/MMoonPointing.cc
===================================================================
--- trunk/MagicSoft/Cosy/main/MMoonPointing.cc	(revision 9553)
+++ trunk/MagicSoft/Cosy/main/MMoonPointing.cc	(revision 9554)
@@ -119,4 +119,11 @@
 Bool_t MMoonPointing::CalcPosition(const ZdAz &moon, ZdAz &srcpos, ZdAz &pointpos) const
 {
+    // Avoid unnecessary calculations
+    if (fOffsetShadow==0)
+    {
+        pointpos = srcpos = moon;
+        return kTRUE;
+    }
+
     const Double_t fcos = const_cast<TGraph2D&>(fCos).Interpolate(moon.Az(), moon.Zd());
     const Double_t fsin = const_cast<TGraph2D&>(fSin).Interpolate(moon.Az(), moon.Zd());
@@ -133,4 +140,11 @@
         return kFALSE;
 
+    // Avoid unnecessary calculations
+    if (fOffsetWobble==0)
+    {
+        pointpos = srcpos;
+        return kTRUE;
+    }
+
     // Calaculate Telescope pointing position:
     const MPositionOffsetCalc calc2(fOffsetWobble, cs, sn);
