Index: trunk/MagicSoft/Cosy/main/MStarguider.cc
===================================================================
--- trunk/MagicSoft/Cosy/main/MStarguider.cc	(revision 7622)
+++ trunk/MagicSoft/Cosy/main/MStarguider.cc	(revision 7707)
@@ -1390,5 +1390,5 @@
 
 Int_t MStarguider::CalcTrackingError(Leds &leds, MStarList &stars,
-                                     ZdAz &d, MTime &t, double &bright)
+                                     ZdAz &d, MTime &t, double &bright, Int_t &num)
 {
     const Int_t max = leds.GetEntries();
@@ -1420,5 +1420,5 @@
     TArrayF x, y, mag;
 
-    Int_t num = 0;
+    num = 0;
 
     // FIXME: Is predefined value 3 a good idea?
@@ -1459,7 +1459,7 @@
     }
 
-    d = TrackingError(x, y, mag, num);
-
-    if (num<1)
+    Int_t numcor = 0;
+    d = TrackingError(x, y, mag, numcor);
+    if (numcor<1)
         return 0;
 
@@ -1547,5 +1547,5 @@
     fTimeFromTp.Set(1970,1,1);
 
-    return num;
+    return numcor;
 }
 
@@ -2030,5 +2030,6 @@
             fSkyBright->SetBackgroundColor(color);
 
-            const Int_t rc = CalcTrackingError(spots, stars, fD, t, bright);
+            Int_t numstars = 0;
+            const Int_t rc = CalcTrackingError(spots, stars, fD, t, bright, numstars);
 
             if ((bright <= 1.75* fLastBright) && (bright < 110))
@@ -2051,5 +2052,5 @@
                 MDriveCom &com = *fCosy->GetDriveCom();
                 com.SendStargReport(fStatus, fD, fSao->GetZdAz(),
-                                    sgcenter, rc, bright,
+                                    sgcenter, numstars, rc, bright,
                                     time.GetMjd(), 0, 0);    // Report
             }
Index: trunk/MagicSoft/Cosy/main/MStarguider.h
===================================================================
--- trunk/MagicSoft/Cosy/main/MStarguider.h	(revision 7622)
+++ trunk/MagicSoft/Cosy/main/MStarguider.h	(revision 7707)
@@ -129,5 +129,5 @@
     void ToggleCaosFilter();
     //void GetCoordinates();
-    Int_t CalcTrackingError(Leds &, MStarList &, ZdAz &, MTime &, double &bright);
+    Int_t CalcTrackingError(Leds &, MStarList &, ZdAz &, MTime &, double &bright, Int_t &num);
     //void CalcTrackingError(Leds &, MStarList &);
     ZdAz TrackingError(TArrayF &alt, TArrayF &az, TArrayF &mag, Int_t &num) const;
Index: trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 7622)
+++ trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 7707)
@@ -220,5 +220,5 @@
 }
 
-bool MDriveCom::SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t n, Double_t bright, Double_t mjd, Double_t x, Double_t y)
+bool MDriveCom::SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t num, Int_t n, Double_t bright, Double_t mjd, Double_t x, Double_t y)
 {
     // miss   [deg]
@@ -247,16 +247,11 @@
     str += txt.Print("%05.1f ",   center.GetX()); //number
     str += txt.Print("%05.1f ",   center.GetY()); //number
-    str += txt.Print("%04d ",   n);               //number
+    str += txt.Print("%04d ",   n);               //number of correleated stars
     str += txt.Print("%03.1f ",  bright);
     str += txt.Print("%12.6f ", t.GetMjd());      // mjd
     str += txt.Print("%.1f ", x);
     str += txt.Print("%.1f ", y);
+    str += txt.Print("%04d ", num);               //number of detected stars
 
     return Send("STARG-REPORT", str, kTRUE);
-
-}
-
-
-
-
-
+}
Index: trunk/MagicSoft/Cosy/tcpip/MDriveCom.h
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MDriveCom.h	(revision 7622)
+++ trunk/MagicSoft/Cosy/tcpip/MDriveCom.h	(revision 7707)
@@ -41,5 +41,5 @@
 
     bool SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er);
-    bool SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t n, Double_t bright, Double_t mjd, Double_t x, Double_t y);
+    bool SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t num, Int_t n, Double_t bright, Double_t mjd, Double_t x, Double_t y);
     bool SendStatus(const char *stat);
 };
