Index: trunk/MagicSoft/Mars/mpointing/MPointing.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MPointing.h	(revision 7211)
+++ trunk/MagicSoft/Mars/mpointing/MPointing.h	(revision 7214)
@@ -16,7 +16,7 @@
 // ---------------------------------------------------
 // FIXME: Replace coord.h completely with this!
-#ifndef __MARS__
-#include "coord.h"
-#else
+//#ifndef __MARS__
+//#include "coord.h"
+//#else
 #include <TVector2.h>
 class AltAz : public TVector2
@@ -26,4 +26,5 @@
     {
     }
+    AltAz(const AltAz &aa) : TVector2(aa) { }
     Double_t Alt() const { return fX; }
     Double_t Az() const  { return fY; }
@@ -37,9 +38,10 @@
     {
     }
+    ZdAz(const ZdAz &aa) : TVector2(aa) { }
     Double_t Zd() const { return fX; }
     Double_t Az() const { return fY; }
     ClassDef(ZdAz, 1)
 };
-#endif
+//#endif
 // ---------------------------------------------------
 
Index: trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc	(revision 7211)
+++ trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc	(revision 7214)
@@ -92,12 +92,8 @@
     switch (fRunType)
     {
-/***/    case MRawRunHeader::kRTData:
-        /*
+    case MRawRunHeader::kRTData:
         if (!fReport)
-        {
-            *fLog << err << "MReportStarguider not found... aborting." << endl;
-            return kFALSE;
-        }*/
-/***/        return kTRUE;
+            *fLog << warn << "MReportStarguider not found... skipped." << endl;
+        return kTRUE;
 
     case MRawRunHeader::kRTMonteCarlo:
@@ -182,5 +178,5 @@
     // Linear starguider calibration taken from April/May data
     // For calibration add MDriveReport::GetErrorZd/Az !
-    devzd -= 2.686/60;
+    devzd -= 2.686/60;   // 1arcmin ~ 5mm
     devaz -= 2.840/60;
 
@@ -195,9 +191,6 @@
     }
 
+    fDeviation->SetDevZdAz(devzd, devaz);
     fSkip[0]++;
-    //fDeviation->SetDevZdAz(devzd, devaz);
-    fDeviation->SetDevZdAz(0, 0);
-
-    cout << "SETTING: " << devzd << " " << devaz << endl;
 
     return kTRUE;
@@ -214,5 +207,5 @@
     case MRawRunHeader::kRTNone:
     case MRawRunHeader::kRTData:
-/***/        return fReport ? ProcessStarguiderReport() : kTRUE;
+        return fReport ? ProcessStarguiderReport() : kTRUE;
 
     case MRawRunHeader::kRTMonteCarlo:
Index: trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc	(revision 7211)
+++ trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc	(revision 7214)
@@ -75,4 +75,5 @@
 #include "MObservatory.h"
 #include "MPointingPos.h"
+#include "MPointingDev.h"
 #include "MSrcPosCam.h"
 #include "MRawRunHeader.h"
@@ -92,6 +93,6 @@
 //
 MSrcPosCalc::MSrcPosCalc(const char *name, const char *title)
-    : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), fSrcPosCam(NULL),
-    fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fMode(kDefault)
+    : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), fDeviation(NULL),
+    fSrcPosCam(NULL), fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fMode(kDefault)
 {
     fName  = name  ? name  : "MSrcPosCalc";
@@ -189,4 +190,6 @@
         return kFALSE;
     }
+
+    fDeviation = (MPointingDev*)pList->FindObject("MPointingDev");
 
     *fLog << inf;
@@ -313,5 +316,5 @@
      */
 
-    /* --- NEW --- */
+    /* --- NEW ---  Same as MSrcPosCorrect::CalcXYinCamera */
     const Double_t XC0 = TMath::Sin(theta)*TMath::Sin(phi-phi0);
     const Double_t XC1 = TMath::Cos(theta0)*TMath::Cos(theta);
@@ -365,7 +368,18 @@
     pos0 *= conv;
 
+    TVector2 vx;
+    if (fDeviation)
+    {
+        vx = CalcXYinCamera(pos0, pos)*fGeom->GetCameraDist()*1000;
+        pos0.SetZdAz(pos0.Theta()-fDeviation->GetDevZdRad(),
+                     pos0.Phi()  -fDeviation->GetDevAzRad());
+    }
+
     // Calculate source position in camera, and convert to mm:
     TVector2 v = CalcXYinCamera(pos0, pos)*fGeom->GetCameraDist()*1000;
     SetSrcPos(v);
+
+    if (fDeviation)
+        cout << fPointPos->GetZd() << ":  " << vx.X() << "/" <<v.X() << "  " << vx.Y() << "/" <<v.Y() << endl;
 
     return kTRUE;
@@ -391,5 +405,5 @@
     if (str.First(':')<0)
     {
-        ret = atof(str);
+        ret = str.Atof();
         return kTRUE;
     }
Index: trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h	(revision 7211)
+++ trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h	(revision 7214)
@@ -12,4 +12,5 @@
 class MObservatory;
 class MPointingPos;
+class MPointingDev;
 class MSrcPosCam;
 class MGeomCam;
@@ -33,4 +34,5 @@
     MPointingPos *fPointPos;
     MPointingPos *fSourcePos;
+    MPointingDev *fDeviation;
     MSrcPosCam   *fSrcPosCam;
     MSrcPosCam   *fSrcPosAnti;
Index: trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.cc	(revision 7211)
+++ trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.cc	(revision 7214)
@@ -39,6 +39,8 @@
 #include "MLogManip.h"
 
+#include "MGeomCam.h"
 #include "MSrcPosCam.h"
 #include "MRawRunHeader.h"
+#include "MReportStarguider.h"
 
 ClassImp(MSrcPosCorrect);
@@ -49,5 +51,5 @@
 //
 MSrcPosCorrect::MSrcPosCorrect(const char *name, const char *title)
-    : fSrcPosCam(NULL), fSrcPosAnti(NULL), fAxis(NULL)
+    : fSrcPosCam(NULL), fSrcPosAnti(NULL), fAxis(NULL), fGeom(NULL)
 {
     fName  = name  ? name  : "MSrcPosCorrect";
@@ -139,4 +141,14 @@
 //    Good night
 //
+// Believing the Database the following data is affected:
+//   1ES1426+428           Off1ES1426-1
+//   1ES1959+650           Off1ES1959-1
+//   2E-1415+2557          Off2E1415-1
+//   Arp-220               OffArp-220-1
+//   GC-W1                 OffHB1553-1
+//   HB89-1553+11          OffM87-1
+//   M87                   OffW-Comae-1
+//   W-Comae
+//
 Int_t MSrcPosCorrect::Process()
 {
@@ -144,14 +156,19 @@
         return kTRUE;
 
-    // FIXME: Implement Culmination correction
-
+    TVector2 d;
     if (fRunNumber<56161 && fRunNumber>53832)
     {
         // dx=-0.048deg, dy=0.034deg, d=0.059deg
         static const TVector2 dxy(-14.24, -9.495);
-        fAxis->SetXY(dxy);
-        fSrcPosCam->Add(dxy);
-        if (fSrcPosAnti)
-            fSrcPosAnti->Add(dxy);
+
+        d -= dxy;
+    }
+
+    fAxis->SetXY(d);
+    fSrcPosCam->Add(d);
+    if (fSrcPosAnti)
+    {
+        d *= -1; // Anti-Source position should always be symetric
+        fSrcPosAnti->Add(d);
     }
 
Index: trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.h	(revision 7211)
+++ trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.h	(revision 7214)
@@ -6,14 +6,19 @@
 #endif
 
+class MGeomCam;
+class TVector2;
 class MSrcPosCam;
+class MReportStarguider;
 
 class MSrcPosCorrect : public MTask
 {
 private:
-    MSrcPosCam   *fSrcPosCam;
-    MSrcPosCam   *fSrcPosAnti;
-    MSrcPosCam   *fAxis;
+    MSrcPosCam *fSrcPosCam;   //!
+    MSrcPosCam *fSrcPosAnti;  //!
+    MSrcPosCam *fAxis;        //!
 
-    UShort_t fRunType;            //! Run Type to decide where to get pointing position from
+    MGeomCam   *fGeom;        //!
+
+    UShort_t fRunType;        //! Run Type to decide where to get pointing position from
     UInt_t   fRunNumber;
 
