Index: trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc	(revision 4865)
+++ trunk/MagicSoft/Cosy/tcpip/MCeCoCom.cc	(revision 6841)
@@ -32,5 +32,5 @@
     // Remove the 30 tokens of the subsystem status
     //  table 12.1 p59
-    for (int i=0; i<30; i++)
+    for (int i=0; i<31; i++)
         str.Remove(0, str.First(' ')+1);
 
@@ -38,5 +38,5 @@
     float zd, az, dec, ra, temp, solar, wind, hum;
     n=sscanf(str.Data(),
-             "%f %f %f %f %f %f %f %f %*f %*f %n",
+             "%f %f %f %f %f %f %f %f %*f %*f %*s %*s %*s %*s %n",
              &zd, &az, &dec, &ra, &temp, &solar, &wind, &hum, &len);
     if (n!=8)
@@ -60,5 +60,5 @@
     fWindSpeed = wind;
 
-    if (fWindSpeed>30)
+    if (fWindSpeed>50)
         fAlarmCounter++;
     else
@@ -136,9 +136,9 @@
     if (fHumidity>80)
         rc++;
-    if (fWindSpeed>10)
+    if (fWindSpeed>30)
         rc++;
-    if (fWindSpeed>20)
+    if (fWindSpeed>40)
         rc++;
-    if (fWindSpeed>30)
+    if (fWindSpeed>50)
         rc++;
 
Index: trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 4865)
+++ trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 6841)
@@ -7,4 +7,5 @@
 #include "MCosy.h"
 #include "MString.h"
+#include "Ring.h"
 
 using namespace std;
@@ -62,4 +63,30 @@
     //cout << "MDriveCom - TRACK... start." << endl;
     fQueue->PostMsg(WM_TRACK, &rd, sizeof(rd));
+    //cout << "MDriveCom - TRACK... done." << endl;
+    return true;
+}
+
+bool MDriveCom::CommandGRB(TString &str)
+{
+    Double_t ra, dec;
+    if (!ReadPosition(str, ra, dec))
+    {
+        cout << "ERROR - Reading position from GRB" << endl;
+        return false;
+    }
+    if (!str.IsNull())
+    {
+        cout << "ERROR - Too many bytes in command GRB" << endl;
+        return false;
+    }
+
+    cout << "CC-COMMAND " << MTime(-1) << " GRB " << ra << "h " << dec << "d '" << str << "'" << endl;
+
+    ra *= 15; // h -> deg
+
+    RaDec rd[2] = { RaDec(ra, dec), RaDec(ra, dec) };
+
+    //cout << "MDriveCom - TRACK... start." << endl;
+    fQueue->PostMsg(WM_GRB, &rd, sizeof(rd));
     //cout << "MDriveCom - TRACK... done." << endl;
     return true;
@@ -113,4 +140,7 @@
     if (cmd==(TString)"RADEC")
         return CommandRADEC(str);
+
+    if (cmd==(TString)"GRB")
+        return CommandGRB(str);
 
     if (cmd==(TString)"ZDAZ")
@@ -190,11 +220,12 @@
 }
 
-bool MDriveCom::SendStargReport(UInt_t stat, ZdAz miss)
-{
-   
-    // miss [rad]
+bool MDriveCom::SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t n, Double_t bright, Double_t mjd)
+{
+    // miss   [deg]
+    // nompos [rad]
     const MTime t(-1);
 
-    miss *= kRad2Deg;
+    miss   *= 60;        // [arcmin]
+    nompos *= kRad2Deg;  // [deg]
 
     // Set status flag
@@ -211,6 +242,13 @@
 
     TString str;
-    str += txt.Print("%05.3f ", miss.Zd());
-    str += txt.Print("%05.3f", miss.Az());
+    str += txt.Print("%05.3f ", miss.Zd());       //[arcmin]
+    str += txt.Print("%05.3f ", miss.Az());       //[arcmin]
+    Print(str, nompos.Zd());                      //[deg]
+    Print(str, nompos.Az());                      //[deg]
+    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("%03.1f",  bright);
+    str += txt.Print("%12.6f ", t.GetMjd());      // mjd
     
     return Send("STARG-REPORT", str, kTRUE);
Index: trunk/MagicSoft/Cosy/tcpip/MDriveCom.h
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MDriveCom.h	(revision 4865)
+++ trunk/MagicSoft/Cosy/tcpip/MDriveCom.h	(revision 6841)
@@ -9,4 +9,5 @@
 class ZdAz;
 class MsgQueue;
+class Ring;
 
 class MDriveCom : public MCeCoCom
@@ -22,4 +23,5 @@
 
     bool CommandRADEC(TString &str);
+    bool CommandGRB(TString &str);
     bool CommandZDAZ(TString &str);
 
@@ -39,5 +41,5 @@
 
     bool SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er);
-    bool SendStargReport(UInt_t stat, ZdAz miss);
+    bool SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t n, Double_t bright, Double_t mjd);
     bool SendStatus(const char *stat);
 };
