Index: /trunk/MagicSoft/Cosy/catalog/SlaPlanets.cc
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/SlaPlanets.cc	(revision 9515)
+++ /trunk/MagicSoft/Cosy/catalog/SlaPlanets.cc	(revision 9516)
@@ -9,9 +9,5 @@
 using namespace std;
 
-SlaPlanets::SlaPlanets(MObservatory::LocationName_t key) : Slalib(key), fDt(slaDt(2000.0)/60./60./24.)
-{
-}
-
-SlaPlanets::~SlaPlanets()
+SlaPlanets::SlaPlanets(MObservatory::LocationName_t key) : SlaStars(key), fDt(slaDt(2000.0)/60./60./24.)
 {
 }
@@ -19,5 +15,5 @@
 void SlaPlanets::SetMjd(double mjd)
 {
-    Slalib::SetMjd(mjd);
+    SlaStars::SetMjd(mjd);
 
     fTt = GetMjd() + slaDtt(GetMjd())/60./60./24.;
@@ -33,19 +29,29 @@
 }
 
-void SlaPlanets::UpdatePlanetPos(ePlanets_t planet)
+// --------------------------------------------------------------------------
+//
+// coordinates of planet: topocentric, equatorial, J2000
+//
+RaDec SlaPlanets::CalcPlanetRaDec(ePlanets_t planet)
 {
-    //
     // coordinates of planet: topocentric, equatorial, J2000
-    //
     double ra, dec, diam;
 
-    // One can use TT instead of TDB for all planets
-    // (except the moon)
+    // One can use TT instead of TDB for all planets (except the moon?)
     // TDB, planet, elong, phi, *ra, *dec, *diam
     slaRdplan(fTt, planet, GetElong(), GetPhi(), &ra, &dec, &diam);
 
+    return RaDec(ra, dec);
+}
+
+void SlaPlanets::UpdatePlanetPos(ePlanets_t planet)
+{
+    // coordinates of planet: topocentric, equatorial, J2000
+    const RaDec rd = CalcPlanetRaDec(planet);
+
     double az, el;
-    slaDe2h(GetAlpha()-ra, dec, GetPhi(), &az, &el);
+    slaDe2h(GetAlpha()-rd.Ra(), rd.Dec(), GetPhi(), &az, &el);
 
     fZdAz[planet].Set(TMath::Pi()/2-el, az);
 }
+
Index: /trunk/MagicSoft/Cosy/catalog/SlaPlanets.h
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/SlaPlanets.h	(revision 9515)
+++ /trunk/MagicSoft/Cosy/catalog/SlaPlanets.h	(revision 9516)
@@ -2,6 +2,6 @@
 #define COSY_SlaPlanets
 
-#ifndef COSY_Slalib
-#include "Slalib.h"
+#ifndef COSY_SlaStars
+#include "SlaStars.h"
 #endif
 
@@ -24,5 +24,5 @@
 } ePlanets_t;
 
-class SlaPlanets : public Slalib
+class SlaPlanets : public SlaStars
 {
 private:
@@ -38,10 +38,12 @@
 public:
     SlaPlanets(MObservatory::LocationName_t key);
-    virtual ~SlaPlanets();
 
     void SetMjd(double mjd);
 
-    void UpdatePlanetPos(ePlanets_t planet);
-    ZdAz GetPlanetPos(ePlanets_t planet) const { return fZdAz[planet]; }
+    RaDec CalcPlanetRaDec(ePlanets_t planet);
+    void  UpdatePlanetPos(ePlanets_t planet);
+    ZdAz  GetPlanetPos(ePlanets_t planet) const { return fZdAz[planet]; }
+
+    void SetPlanet(ePlanets_t planet) { Set(CalcPlanetRaDec(planet)/TMath::DegToRad()); }
 
     ClassDef(SlaPlanets, 0)
Index: /trunk/MagicSoft/Cosy/catalog/SlaStars.cc
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/SlaStars.cc	(revision 9515)
+++ /trunk/MagicSoft/Cosy/catalog/SlaStars.cc	(revision 9516)
@@ -3,4 +3,5 @@
 #include "slalib.h"
 
+#include "MAstro.h"
 #include "MPointing.h"
 
@@ -29,6 +30,10 @@
 void SlaStars::Set(const RaDec &radec)
 {
+    double ha;
+
     fRaDec = radec * TMath::DegToRad();
-    fAltAz = CalcAltAz(fRaDec);
+    fAltAz = CalcAltAz(fRaDec, &ha);
+
+    fHourAngle = ha;
 }
 
@@ -136,5 +141,5 @@
 }
 
-ZdAz SlaStars::CalcZdAz(const RaDec &radec) const
+ZdAz SlaStars::CalcZdAz(const RaDec &radec, double *ha) const
 {
     //
@@ -167,9 +172,12 @@
               &r1);   // observed right ascension (radians)
 
+    if (ha)
+        *ha = h0*MAstro::RadToHor();
+
     return ZdAz(zd, az);
 }
-AltAz SlaStars::CalcAltAz(const RaDec &radec) const
+AltAz SlaStars::CalcAltAz(const RaDec &radec, double *ha) const
 {
-    ZdAz zdaz = CalcZdAz(radec);
+    ZdAz zdaz = CalcZdAz(radec, ha);
     return AltAz(TMath::Pi()/2-zdaz.Zd(), zdaz.Az());
 }
Index: /trunk/MagicSoft/Cosy/catalog/SlaStars.h
===================================================================
--- /trunk/MagicSoft/Cosy/catalog/SlaStars.h	(revision 9515)
+++ /trunk/MagicSoft/Cosy/catalog/SlaStars.h	(revision 9516)
@@ -13,6 +13,8 @@
 {
 private:
-    AltAz    fAltAz;    // [rad]
-    RaDec    fRaDec;    // [rad]
+    AltAz    fAltAz;     // [rad]
+    RaDec    fRaDec;     // [rad]
+
+    Double_t fHourAngle; // [h]
 
     double   fAmprms[21];
@@ -24,6 +26,7 @@
 
     //    const AltAz GetAltAz() const { return fAltAz*360/D2PI; }
-    //    const ZdAz  GetZdAz()  const { return ZdAz(DPI/2-fAltAz.Alt(), fAltAz.Az())*360/D2PI; }
-    //    const RaDec GetRaDec() const { return fRaDec*360/D2PI; }
+    const ZdAz   GetZdAz()  const     { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az())*TMath::DegToRad(); }
+    const RaDec  GetRaDec() const     { return fRaDec/TMath::DegToRad(); }
+    const double GetHourAngle() const { return fHourAngle; }
 
     virtual void SetMjd(double mjd);
@@ -41,11 +44,11 @@
     RaDec  CalcRaDecFast(const ZdAz  &altaz) const;
 
-    AltAz  CalcAltAz(const RaDec &radec) const;
-    ZdAz   CalcZdAz (const RaDec &radec) const;
+    AltAz  CalcAltAz(const RaDec &radec, double *ha=0) const;
+    ZdAz   CalcZdAz (const RaDec &radec, double *ha=0) const;
 
-    AltAz  CalcAltAz(const RaDec &radec, double mjd)
-    { SetMjd(mjd); return CalcAltAz(radec); }
-    ZdAz   CalcZdAz (const RaDec &radec, double mjd)
-    { SetMjd(mjd); return CalcZdAz(radec); }
+    AltAz  CalcAltAz(const RaDec &radec, double mjd, double *ha=0)
+    { SetMjd(mjd); return CalcAltAz(radec, ha); }
+    ZdAz   CalcZdAz (const RaDec &radec, double mjd, double *ha=0)
+    { SetMjd(mjd); return CalcZdAz(radec, ha); }
 
     AltAz  CalcAltAzFast(const RaDec &radec) const;
Index: /trunk/MagicSoft/Cosy/main/MCosy.cc
===================================================================
--- /trunk/MagicSoft/Cosy/main/MCosy.cc	(revision 9515)
+++ /trunk/MagicSoft/Cosy/main/MCosy.cc	(revision 9516)
@@ -349,4 +349,16 @@
 
     return point.SetPosition(dst, track);
+}
+
+void MCosy::TrackPlanet(const Int_t &p) // ra, dec [rad]
+{
+    MTracking track(this);
+    track.SetOut(fOutRep);
+
+    track.SetPointAcc(0.03, 0.01);
+    track.SetPointVelocity(0.3);
+    track.SetTrackAcc(0.01, 0.01);
+
+    track.TrackPlanet((ePlanets_t)p);
 }
 
@@ -657,6 +669,4 @@
         {
             RaDec dest = ((RaDec*)mp)[0];
-            if (fStarguider)
-                fStarguider->SetPointingPosition(((RaDec*)mp)[1]);
             if (!CheckNetwork())
                 return 0xebb0;
@@ -670,4 +680,16 @@
         return 0x8888;
 
+    case WM_PLANET:
+        //cout << "WM_PLANET: START" << endl;
+        {
+            const Int_t p = ((Int_t*)mp)[0];
+            if (!CheckNetwork())
+                return 0xebb1;
+
+            TrackPlanet(p);
+        }
+        //cout << "WM_PLANET: done. (return 0x8889)" << endl;
+        return 0x8889;
+/*
     case WM_NEWTRACK:
         //cout << "WM_NewTrack: START" << endl;
@@ -675,5 +697,5 @@
         //cout << "WM_NewTrack: done. (return 0x9999)" << endl;
         return 0x9999;
-
+*/
     case WM_LOADBENDING:
         //cout << "WM_LoadBending: START" << endl;
@@ -826,5 +848,5 @@
     {
         tout.Start(999);
-        fCom->SendReport(fStatus, fRaDec, fZdAzSoll, bendist, fTrackingError, armed,
+        fCom->SendReport(fStatus, fRaDec, fHourAngle, fZdAzSoll, bendist, fTrackingError, armed,
                          fStarguider ? fStarguider->GetStarguiderMode() : 0);
     }
Index: /trunk/MagicSoft/Cosy/main/MCosy.h
===================================================================
--- /trunk/MagicSoft/Cosy/main/MCosy.h	(revision 9515)
+++ /trunk/MagicSoft/Cosy/main/MCosy.h	(revision 9516)
@@ -30,5 +30,5 @@
 //#define WM_CALIB        0x1004
 #define WM_TPOINT       0x1005
-#define WM_NEWTRACK     0x1006
+//#define WM_NEWTRACK     0x1006
 #define WM_LOADBENDING  0x1007
 #define WM_RESETBENDING 0x1008
@@ -46,4 +46,5 @@
 #define WM_STARGTPOINT  0x1014
 #define WM_STARGMODE    0x1015
+#define WM_PLANET       0x1016
 
 class Dkc;
@@ -77,10 +78,11 @@
     TMutex fMutexGui;
 
-    ZdAz  fTrackingError; // [rad] Tracking Offset between SE and calc-pos
-    ZdAz  fZdAzSoll;      // [rad] Soll position when moving
-    RaDec fRaDec;         // Position to track
-    ZdAz  fAccuracy;      // Actual accuracy of Tracking
-    ZdAz  fMin;
-    ZdAz  fMax;
+    ZdAz     fTrackingError; // [rad] Tracking Offset between SE and calc-pos
+    ZdAz     fZdAzSoll;      // [rad] Soll position when moving
+    RaDec    fRaDec;         // Position to track
+    Double_t fHourAngle;     // Hour Angle of Position to track
+    ZdAz     fAccuracy;      // Actual accuracy of Tracking
+    ZdAz     fMin;
+    ZdAz     fMax;
 
     MPointing fBending;
@@ -101,4 +103,5 @@
 
     int  SetPosition(const ZdAz &dst, Bool_t track=kFALSE);
+    void TrackPlanet(const Int_t &p);
     void TrackPosition(const RaDec &dst);    // ra, dec [rad]
     void TrackPositionGRB(const RaDec &dst); // ra, dec [rad]
Index: /trunk/MagicSoft/Cosy/main/MTracking.cc
===================================================================
--- /trunk/MagicSoft/Cosy/main/MTracking.cc	(revision 9515)
+++ /trunk/MagicSoft/Cosy/main/MTracking.cc	(revision 9516)
@@ -4,8 +4,9 @@
 
 #include "dkc.h"
-//#include "shaftencoder.h"
+
+#include "SlaStars.h"
 
 #include "MCosy.h"
-#include "SlaStars.h"
+#include "MStarguider.h"
 
 #include "MDriveCom.h"
@@ -17,4 +18,10 @@
 //#define EXPERT
 #undef EXPERT
+
+MTracking::MTracking(MCosy *cosy)
+    : MSlewing(cosy), MThread("MTracking"), fSlalib(fCosy->fObservatory),
+    fTrackAcc(0, 0), fOut(0)
+{
+}
 
 // --------------------------------------------------------------------------
@@ -146,5 +153,5 @@
 // velocities are limited to the maximum velocity.
 //
-Bool_t MTracking::LimitSpeed(const ZdAz &vt, const SlaStars &sla) const
+Bool_t MTracking::LimitSpeed(const ZdAz &vt) const
 {
     // vt [deg/min]
@@ -159,5 +166,5 @@
 
     // Calculate approximate velocity of both axis
-    ZdAz vcalc = sla.GetApproxVel(fCosy->fRaDec);  // [rad/rad]
+    ZdAz vcalc = fSlalib.GetApproxVel(fCosy->fRaDec);  // [rad/rad]
 
     //vcalc *= 1./(24*60);          // [U_tel/min]
@@ -209,15 +216,37 @@
 }
 
-void MTracking::TrackPosition(const RaDec &dst) // ra, dec [rad]
-{
-    SlaStars sla(fCosy->fObservatory);
-
-    //
-    // Position to actual position
-    //
-    sla.Now();
-    ZdAz dest = sla.CalcZdAz(dst);
-
-    gLog << all << sla.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl;
+void MTracking::UpdateSlalib(SlaPlanets &sla)
+{
+    if (fTrackType<0)
+        sla.Set(fTrackPos);
+    else
+        sla.SetPlanet((ePlanets_t)fTrackType);
+
+    if (fCosy->fStarguider)
+        fCosy->fStarguider->SetPointingPosition(sla.GetRaDec());
+}
+
+void MTracking::UpdateSlalib(Double_t dt=0)
+{
+    fSlalib.Now(dt);
+    UpdateSlalib(fSlalib);
+
+    fCosy->fRaDec     = fSlalib.GetRaDec();
+    fCosy->fHourAngle = fSlalib.GetHourAngle();
+}
+
+void MTracking::UpdateSlalib(SlaPlanets &sla, Double_t mjd)
+{
+    sla.SetMjd(mjd);
+    UpdateSlalib(sla);
+}
+
+bool MTracking::Move()
+{
+    const RaDec &dst = fSlalib.GetRaDec();
+
+    ZdAz dest = fSlalib.GetZdAz();//fSlalib.CalcZdAz(dst);
+
+    gLog << all << fSlalib.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl;
 
     // If the star is culminating behind the zenith (South) we want to
@@ -225,5 +254,5 @@
     // culminating before the zenith (north) we want the star to be
     // aligned between -180 and 180deg (which is the default of CalcZdAz)
-    if (sla.GetPhi()>dst.Dec() && dest.Az()<0)
+    if (fSlalib.GetPhi()>dst.Dec() && dest.Az()<0)
     {
         // align az from -180/180 to 0/360
@@ -238,10 +267,39 @@
     {
         gLog << err << "ERROR - Cannot start tracking, positioning failed." << endl;
+        return false;
+    }
+
+    return true;
+}
+
+void MTracking::TrackPosition(const RaDec &dst)
+{
+    fTrackPos  = dst;
+    fTrackType = -1;
+
+    // Start tracking
+    Track();
+}
+
+void MTracking::TrackPlanet(ePlanets_t planet)
+{
+    fTrackPos  = RaDec();
+    fTrackType = planet;
+
+    // Start tracking
+    Track();
+}
+
+void MTracking::Track() // ra, dec [rad]
+{
+    // Position to corrent nominal position
+    UpdateSlalib();
+
+    if (!Move())
         return;
-    }
+
+    //fCosy->fRaDec = fSlalib.GetRaDec();
 
     // Initialize Tracker (slalib or starguider)
-    fCosy->fRaDec = dst;
-
     RunThread();
 
@@ -256,10 +314,12 @@
 
     // Get current nominal local position
-    sla.Now();
-    ZdAz pos = sla.CalcZdAz(fCosy->fRaDec);
+    UpdateSlalib();
+    //fCosy->fRaDec = fSlalib.GetRaDec();
+
+    ZdAz pos = fSlalib.GetZdAz();//fSlalib.CalcZdAz(fSlalib.GetRaDec());
 
     // Some output
-    XY xy(TMath::RadToDeg()*dst.Ra()*24/360, TMath::RadToDeg()*dst.Dec());
-    gLog << all << sla.GetTime() << " - Start Tracking: Ra=" << xy.X() << "h Dec=";
+    XY xy(TMath::RadToDeg()*fCosy->fRaDec.Ra()/15, TMath::RadToDeg()*fCosy->fRaDec.Dec());
+    gLog << all << fSlalib.GetTime() << " - Start Tracking: Ra=" << xy.X() << "h Dec=";
     gLog << xy.Y() << "\xb0 @ Zd=" << pos.Zd()*kRad2Deg <<"deg Az=" << pos.Az()*kRad2Deg <<"deg" << endl;
 
@@ -295,10 +355,11 @@
         // Request Target position for Now+dt
         //
-        sla.Now(dt);
+        UpdateSlalib();
+        //fCosy->fRaDec = fSlalib.GetRaDec();
 
         //
         // Request nominal position for this time in the future (To+dt)
         //
-        const ZdAz pointing = sla.CalcZdAz(fCosy->fRaDec); // [rad]
+        const ZdAz pointing = fSlalib.GetZdAz(); //fSlalib.CalcZdAz(fSlalib.GetRaDec()); // [rad]
         ZdAz dest = fCosy->AlignTrackingPos(pointing);     // fix ambiguity
 
@@ -329,5 +390,5 @@
         //v.Az(v.Az()*(1+TMath::Min(0.3, kpAz)));
 
-        if (LimitSpeed(v, sla))
+        if (LimitSpeed(v))
         {
             gLog << dbg << "vt: " << v.Zd() << " " << v.Az() << "re/min" << endl;
@@ -372,5 +433,5 @@
     }
 
-    sla.Now();
+    fSlalib.Now();
 
     CancelThread();
@@ -379,5 +440,5 @@
     fCosy->StopMovement();
 
-    gLog << all << sla.GetTime() << " - Tracking stopped @ Zd=";
+    gLog << all << fSlalib.GetTime() << " - Tracking stopped @ Zd=";
     gLog << fCosy->fZdAzSoll.Zd()*TMath::RadToDeg() <<"deg Az=";
     gLog << fCosy->fZdAzSoll.Az()*TMath::RadToDeg() <<"deg" << endl;
@@ -391,8 +452,9 @@
     gLog << inf2 << "- Tracking Thread started (" << MTime(-1) << ")" << endl;
 
-    SlaStars sla(fCosy->fObservatory);
-    sla.Now();
-
-    ZdAz soll = sla.CalcZdAz(fCosy->fRaDec); // [rad]
+    SlaPlanets sla(fSlalib.GetObservatoryKey());
+
+    UpdateSlalib(sla);
+
+    //ZdAz soll = sla.GetZdAz(); //sla.CalcZdAz(sla.GetRaDec()); // [rad]
 
     //
@@ -434,10 +496,10 @@
         if (phca1)
         {
-            ZdAz dummy = sla.CalcZdAz(fCosy->fRaDec, mjdzd);
+            UpdateSlalib(sla, mjdzd);
+
+            ZdAz dummy = sla.GetZdAz();//sla.CalcZdAz(radec, mjdzd);
             dummy = fCosy->AlignTrackingPos(dummy);
             fCosy->fZdAzSoll.Zd(dummy.Zd());
-            soll.Zd(fCosy->fBending(dummy).Zd()); // [rad]
-
-            fCosy->fTrackingError.Zd(soll.Zd()-istse.Zd());
+            fCosy->fTrackingError.Zd(fCosy->fBending(dummy).Zd()-istse.Zd());
 
             TThread::CancelPoint();
@@ -445,10 +507,10 @@
         if (phcaz)
         {
-            ZdAz dummy = sla.CalcZdAz(fCosy->fRaDec, mjdaz);
+            UpdateSlalib(sla, mjdaz);
+
+            ZdAz dummy = sla.GetZdAz();//sla.CalcZdAz(radec, mjdaz);
             dummy = fCosy->AlignTrackingPos(dummy);
             fCosy->fZdAzSoll.Az(dummy.Az());
-            soll.Az(fCosy->fBending(dummy).Az()); // [rad]
-
-            fCosy->fTrackingError.Az(soll.Az()-istse.Az());
+            fCosy->fTrackingError.Az(fCosy->fBending(dummy).Az()-istse.Az());
 
             TThread::CancelPoint();
Index: /trunk/MagicSoft/Cosy/main/MTracking.h
===================================================================
--- /trunk/MagicSoft/Cosy/main/MTracking.h	(revision 9515)
+++ /trunk/MagicSoft/Cosy/main/MTracking.h	(revision 9516)
@@ -4,4 +4,8 @@
 #ifndef COSY_MSlewing
 #include "MSlewing.h"
+#endif
+
+#ifndef COSY_SlaPlanets
+#include "SlaPlanets.h"
 #endif
 
@@ -17,18 +21,30 @@
 {
 private:
+    SlaPlanets fSlalib;
+
     ZdAz fTrackAcc;
+
+    Int_t fTrackType;
+    RaDec fTrackPos;
 
     MLog   *fOut;
 
+    void UpdateSlalib(SlaPlanets &sla);
+    void UpdateSlalib(Double_t dt);
+    void UpdateSlalib(SlaPlanets &sla, Double_t mjd);
+
     bool SetVelocity(const ZdAz &v);
-    bool LimitSpeed(const ZdAz &vt, const SlaStars &sla) const;
+    bool LimitSpeed(const ZdAz &vt) const;
     bool InitTracking();
+    bool Move();
+    void Track();
 
     Int_t Thread();
 
 public:
-    MTracking(MCosy *cosy) : MSlewing(cosy), MThread("MTracking"), fTrackAcc(0, 0), fOut(0) { }
+    MTracking(MCosy *cosy);
 
     void TrackPosition(const RaDec &dst); // ra, dec [rad]
+    void TrackPlanet(ePlanets_t planet);  // ra, dec [rad]
     void SetTrackAcc(Float_t zd, Float_t az) { fTrackAcc.Zd(zd); fTrackAcc.Az(az); }
 
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);
 };
