Index: trunk/MagicSoft/Mars/mpointing/MHPointing.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MHPointing.cc	(revision 7690)
+++ trunk/MagicSoft/Mars/mpointing/MHPointing.cc	(revision 7726)
@@ -29,4 +29,9 @@
 // Display drive information
 //
+// Class Version 2:
+// ----------------
+//
+//  + TGraph fNumStarsCor; // Number of correlated stars identified by starguider
+//
 ////////////////////////////////////////////////////////////////////////////
 #include "MHPointing.h"
@@ -86,11 +91,12 @@
 
     // Init Graphs
-    fDevTimeSG.SetNameTitle("DevSG",       "Absolute deviation of drive (black) and starguider (blue)");
-    fDevTimeCosy.SetNameTitle("DevCosy",   "Cosy deviation");
-    fBrightness.SetNameTitle("Brightness", "Arbitrary Sky Brightness (black), No. of stars identified by starguider (blue)");
-    fNumStars.SetNameTitle("NumStars",     "Number of stars identified by starguider");
-    fDevZd.SetNameTitle("DevZd",           "Starguider deviation Zd (blue), Az (black)");
-    fDevAz.SetNameTitle("DevAz",           "Starguider Deviation Az");
-    fPosZd.SetNameTitle("PosZd",           "Nominal position Zd");
+    fDevTimeSG.SetNameTitle("DevSG",         "Absolute deviation of drive (black) and starguider (blue)");
+    fDevTimeCosy.SetNameTitle("DevCosy",     "Cosy deviation");
+    fBrightness.SetNameTitle("Brightness",   "Arbitrary Sky Brightness (black), No. of stars identified by starguider (blue)");
+    fNumStars.SetNameTitle("NumStars",       "Number of stars identified by starguider");
+    fNumStarsCor.SetNameTitle("NumStarsCor", "Number of stars correlated by starguider");
+    fDevZd.SetNameTitle("DevZd",             "Starguider deviation Zd (blue), Az (black)");
+    fDevAz.SetNameTitle("DevAz",             "Starguider Deviation Az");
+    fPosZd.SetNameTitle("PosZd",             "Nominal position Zd");
     //fPosAz.SetNameTitle("PosZd",          "Position Az");
 
@@ -99,4 +105,5 @@
     InitGraph(fBrightness);
     InitGraph(fNumStars);
+    InitGraph(fNumStarsCor);
     InitGraph(fDevZd);
     InitGraph(fDevAz);
@@ -108,8 +115,10 @@
     fBrightness.SetMinimum(0);
     fNumStars.SetMinimum(0);
+    fNumStarsCor.SetMinimum(0);
 
     fDevTimeSG.SetMarkerColor(kBlue);
     fDevZd.SetMarkerColor(kBlue);
     fNumStars.SetMarkerColor(kBlue);
+    fNumStarsCor.SetMarkerColor(kMagenta);
     //fPosAz.SetMarkerColor(kBlue);
 }
@@ -170,6 +179,7 @@
         if (fReportSG->GetSkyBrightness()>0)
         {
-            AddPoint(fBrightness, tm, fReportSG->GetSkyBrightness());
-            AddPoint(fNumStars,   tm, fReportSG->GetNumIdentifiedStars());
+            AddPoint(fBrightness,  tm, fReportSG->GetSkyBrightness());
+            AddPoint(fNumStars,    tm, fReportSG->GetNumIdentifiedStars());
+            AddPoint(fNumStarsCor, tm, fReportSG->GetNumCorrelatedStars());
         }
 
@@ -227,9 +237,10 @@
 // Update position of an axis on the right side of the histogram
 //
-void MHPointing::UpdateRightAxis(TGraph &g) const
-{
-    TH1 &h = *g.GetHistogram();
-
-    const Double_t max = h.GetMaximum();
+void MHPointing::UpdateRightAxis(TGraph &g1, TGraph &g2) const
+{
+    TH1 &h1 = *g1.GetHistogram();
+    TH1 &h2 = *g2.GetHistogram();
+
+    const Double_t max = TMath::Max(h1.GetMaximum(), h2.GetMaximum());
     if (max==0)
         return;
@@ -239,6 +250,6 @@
         return;
 
-    axis->SetX1(g.GetXaxis()->GetXmax());
-    axis->SetX2(g.GetXaxis()->GetXmax());
+    axis->SetX1(g1.GetXaxis()->GetXmax());
+    axis->SetX2(g1.GetXaxis()->GetXmax());
     axis->SetY1(gPad->GetUymin());
     axis->SetY2(gPad->GetUymax());
@@ -292,4 +303,5 @@
     fBrightness.Draw("AP");
     fNumStars.Draw("P");
+    fNumStarsCor.Draw("P");
     DrawRightAxis("N");
 
@@ -327,5 +339,5 @@
     {
         fNumStars.GetHistogram()->GetYaxis()->SetTitleColor(kBlue);
-        UpdateRightAxis(fNumStars);
+        UpdateRightAxis(fNumStars, fNumStarsCor);
     }
 /*
Index: trunk/MagicSoft/Mars/mpointing/MHPointing.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MHPointing.h	(revision 7690)
+++ trunk/MagicSoft/Mars/mpointing/MHPointing.h	(revision 7726)
@@ -25,4 +25,5 @@
 
     TGraph             fNumStars;    // Number of stars identified by starguider
+    TGraph             fNumStarsCor; // Number of correlated stars identified by starguider
 
     TGraph             fDevZd;       // Starguider deviation Zd
@@ -36,5 +37,5 @@
     void AddPoint(TGraph &g, Double_t x, Double_t y) const;
     void DrawGraph(TGraph &g, const char *y=0) const;
-    void UpdateRightAxis(TGraph &g) const;
+    void UpdateRightAxis(TGraph &g1, TGraph &g2) const;
     void DrawRightAxis(const char *title) const;
 
@@ -48,5 +49,5 @@
     void Paint(Option_t *opt="");
 
-    ClassDef(MHPointing, 1) // Histogram to display tracking/pointing information
+    ClassDef(MHPointing, 2) // Histogram to display tracking/pointing information
 };
 
Index: trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc	(revision 7690)
+++ trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc	(revision 7726)
@@ -140,4 +140,5 @@
     {
         fDeviation->SetDevZdAz(0, 0);
+        fDeviation->SetDevXY(0, 0);   //?!?
         fSkip[1]++;
         return kTRUE;
Index: trunk/MagicSoft/Mars/mpointing/MPointingPos.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MPointingPos.cc	(revision 7690)
+++ trunk/MagicSoft/Mars/mpointing/MPointingPos.cc	(revision 7726)
@@ -64,4 +64,6 @@
 // (Zd/Az) coordinates.
 //
+// Return angle [rad] in the range -pi, pi
+//
 // For more information see MAstro::RotationAngle
 //
@@ -76,4 +78,6 @@
 // seen with an Alt/Az telescope calculated from the stored sky
 // (Ra/Dec) coordinates.
+//
+// Return angle [rad] in the range -pi, pi
 //
 // For more information see MAstro::RotationAngle
