Index: trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 9515)
+++ trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc	(revision 9516)
@@ -64,5 +64,5 @@
     ra *= 15; // h -> deg
 
-    RaDec rd[2] = { RaDec(ra, dec), RaDec(ra, dec) };
+    RaDec rd(ra, dec);
 
     //cout << "MDriveCom - TRACK... start." << endl;
@@ -122,4 +122,57 @@
     if (fQueue)
         fQueue->PostMsg(WM_POSITION, &za, sizeof(za));
+    //cout << "MDriveCom - POSITION... done." << endl;
+    return true;
+}
+
+bool MDriveCom::CommandCELEST(TString &str)
+{
+    str = str.Strip(TString::kBoth);
+    if (str.IsNull())
+    {
+        gLog << err << "ERROR - CELEST command empty." << endl;
+        return false;
+    }
+
+    Int_t id, len; // Starguider switched on or not
+    Float_t dra, ddec;
+    Int_t n=sscanf(str.Data(), "%d %f %f %n", &id, &dra, &ddec, &len);
+    if (n!=1)
+    {
+        gLog << warn << "WARNING - Not enough argmuents (CELEST)." << endl;
+        return kCONTINUE;
+    }
+
+    str.Remove(0, len);
+    str = str.Strip(TString::kBoth);
+
+    if (!str.IsNull())
+    {
+        gLog << err << "ERROR - Too many bytes in command CELEST" << endl;
+        return false;
+    }
+
+    gLog << all << "CC-COMMAND " << MTime(-1) << " CELEST ID=" << id << " dRa=" << dra << "deg dDec=" << ddec << "deg" << endl;
+
+    if (id==0)
+    {
+        gLog << err << "ERROR - Tracking the sun IS STRICLY FORBIDDEN - ignored." << endl;
+        return false;
+    }
+
+    if (id<0 || id>9)
+    {
+        gLog << err << "ERROR - Unknown id " << id << " (must be between 1 and 9)." << endl;
+        return false;
+    }
+
+    // Moon;
+    id = 3;
+
+    gLog << warn << "WARNING - Tracking the moon's center forced." << endl;
+
+    //cout << "MDriveCom - POSITION... start." << endl;
+    if (fQueue)
+        fQueue->PostMsg(WM_PLANET, &id, sizeof(id));
     //cout << "MDriveCom - POSITION... done." << endl;
     return true;
@@ -245,4 +298,7 @@
         return CommandZDAZ(str);
 
+    if (cmd==(TString)"CELEST")
+        return CommandCELEST(str);
+
     if (cmd==(TString)"PREPS")
         return CommandPREPS(str);
@@ -277,5 +333,5 @@
 }
 
-bool MDriveCom::SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er, Bool_t armed, Int_t stargmd)
+bool MDriveCom::SendReport(UInt_t stat, RaDec rd, double ha, ZdAz so, ZdAz is, ZdAz er, Bool_t armed, Int_t stargmd)
 {
     // rd [rad]
@@ -304,5 +360,5 @@
     Print(str, rd.Ra());    // Ra
     Print(str, rd.Dec());   // Dec
-    Print(str, 0);          // HA
+    Print(str, ha);         // HA
     str += MString::Format("%12.6f ", t.GetMjd()); // mjd
     Print(str, so.Zd());
Index: trunk/MagicSoft/Cosy/tcpip/MDriveCom.h
===================================================================
--- trunk/MagicSoft/Cosy/tcpip/MDriveCom.h	(revision 9515)
+++ trunk/MagicSoft/Cosy/tcpip/MDriveCom.h	(revision 9516)
@@ -30,4 +30,5 @@
     bool CommandGRB(TString &str);
     bool CommandZDAZ(TString &str);
+    bool CommandCELEST(TString &str);
     bool CommandPREPS(TString &str);
     bool CommandARM(TString &str);
@@ -53,11 +54,11 @@
 
 
-    bool SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er, Bool_t armed, Int_t stargmd);
+    bool SendReport(UInt_t stat, RaDec rd, double ha, ZdAz so, ZdAz is, ZdAz er, Bool_t armed, Int_t stargmd);
     bool SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t num, Int_t n, Double_t bright, Double_t mjd, Int_t numleds, Int_t numrings);
-//    bool SendTPoint(char type);
     bool SendTPoint(bool stat, char type, Float_t mag, const char *name, const AltAz &za0, const ZdAz &za1,
                     const TVector2 &xy, Float_t dzd, Float_t daz, const MTime &t,
                     const Ring &center, const Led &star, Int_t numleds, Int_t numrings,
                     Int_t numstars=0, Int_t numcor=0, Float_t bright=0);
+
     bool SendStatus(const char *stat);
 };
