Index: trunk/MagicSoft/Cosy/Changelog
===================================================================
--- trunk/MagicSoft/Cosy/Changelog	(revision 1783)
+++ trunk/MagicSoft/Cosy/Changelog	(revision 1784)
@@ -1,3 +1,15 @@
                                                                   -*-*- END -*-*-
+ 2003/02/21 - Thomas Bretz (La Palma):
+
+   * gui/MGSkyPosition.[h,cc]:
+     - some changes trying to get rid of a strange memory leak
+
+   * candrv/nodedrv.cc:
+     - changed output
+
+   * catalog/Slalib.h:
+     - added Hms2DegRad and Dms2Rad
+
+
  2003/02/16 - Thomas Bretz (La Palma):
 
Index: trunk/MagicSoft/Cosy/candrv/nodedrv.cc
===================================================================
--- trunk/MagicSoft/Cosy/candrv/nodedrv.cc	(revision 1783)
+++ trunk/MagicSoft/Cosy/candrv/nodedrv.cc	(revision 1784)
@@ -154,5 +154,5 @@
 
     lout << hex << setfill('0');
-    lout << "Sdo=" << idx  << "/" << (int)subidx << " set.";
+    lout << "Node #" << (int)fId << ": Sdo=" << idx  << "/" << (int)subidx << " set.";
     lout << endl;
 
Index: trunk/MagicSoft/Cosy/catalog/Slalib.h
===================================================================
--- trunk/MagicSoft/Cosy/catalog/Slalib.h	(revision 1783)
+++ trunk/MagicSoft/Cosy/catalog/Slalib.h	(revision 1784)
@@ -17,4 +17,18 @@
     virtual ~Slalib();
 
+    static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec)
+    {
+        /* pi/(180*3600):  arcseconds to radians */
+#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
+        return DAS2R * (60.0 * (60.0 * (Double_t)deg + (Double_t)min) + sec);
+    }
+
+    static Double_t Hms2Rad(Int_t hor, UInt_t min, Double_t sec)
+    {
+        /* pi/(12*3600):  seconds of time to radians */
+#define DS2R 7.2722052166430399038487115353692196393452995355905e-5
+        return DS2R * (60.0 * (60.0 * (Double_t)hor + (Double_t)min) + sec);
+    }
+
     virtual void SetMjd(double mjd);
 
Index: trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
===================================================================
--- trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc	(revision 1783)
+++ trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc	(revision 1784)
@@ -72,5 +72,5 @@
     {
         fStars[i] = new TArc(0, 0, 1);
-        InitArc(fStars[i], 1001, kWhite, kWhite);
+        InitArc(fStars[i], 1001, 17, 15);
         fList->Add(fStars[i]);
     }
@@ -104,29 +104,30 @@
 }
 
+static const RaDec stars[13] =
+{
+    // 32349   Sirius           -1.44 1.45    2.64      0.009   A0m
+    (RaDec(Slalib::Hms2Rad(  6, 45, 0), Slalib::Dms2Rad(-16, 42, 0))),
+    // 30438   Canopus          -0.62 -5.53   95.88     0.164   F0Ib
+    (RaDec(Slalib::Hms2Rad(  6, 23, 0), Slalib::Dms2Rad(-52, 41, 0))),
+    // 69673   Arcturus         -0.05 -0.31   11.25     1.239   K2IIIp
+    (RaDec(Slalib::Hms2Rad( 14, 15, 0), Slalib::Dms2Rad( 19, 10, 0))),
+    (RaDec(Slalib::Hms2Rad( 01, 37, 6), Slalib::Dms2Rad(-57, 14, 0))),
+    (RaDec(Slalib::Hms2Rad( 12, 26, 6), Slalib::Dms2Rad(-63, 06, 0))),
+    (RaDec(Slalib::Hms2Rad( 13, 25, 2), Slalib::Dms2Rad(-11, 10, 0))),
+    (RaDec(Slalib::Hms2Rad(  5, 14, 0), Slalib::Dms2Rad(- 8, 12, 5))),
+    (RaDec(Slalib::Hms2Rad( 19, 50, 0), Slalib::Dms2Rad(- 8, 52, 6))),
+    (RaDec(Slalib::Hms2Rad( 18, 37, 0), Slalib::Dms2Rad( 38, 47, 0))),
+    (RaDec(Slalib::Hms2Rad(  5, 16, 0), Slalib::Dms2Rad( 46, 00, 0))),
+    (RaDec(Slalib::Hms2Rad(  7, 39, 0), Slalib::Dms2Rad(  5, 14, 0))),
+    (RaDec(Slalib::Hms2Rad(  5, 55, 0), Slalib::Dms2Rad(  7, 24, 0))),
+    (RaDec(Slalib::Hms2Rad( 19, 50, 0), Slalib::Dms2Rad(  8, 52, 0)))
+};
+
 void MGSkyPosition::UpdateStars()
 {
-    RaDec stars[13];
-
-    // 32349   Sirius           -1.44 1.45    2.64      0.009   A0m
-    stars[0] = RaDec(MObservatory::Hms2Rad(  6, 45, 0), MObservatory::Dms2Rad(-16, 42, 0));
-    // 30438   Canopus          -0.62 -5.53   95.88     0.164   F0Ib
-    stars[1] = RaDec(MObservatory::Hms2Rad(  6, 23, 0), MObservatory::Dms2Rad(-52, 41, 0));
-    // 69673   Arcturus         -0.05 -0.31   11.25     1.239   K2IIIp
-    stars[2] = RaDec(MObservatory::Hms2Rad( 14, 15, 0), MObservatory::Dms2Rad( 19, 10, 0));
-    stars[3] = RaDec(MObservatory::Hms2Rad( 01, 37, 6), MObservatory::Dms2Rad(-57, 14, 0));
-    stars[4] = RaDec(MObservatory::Hms2Rad( 12, 26, 6), MObservatory::Dms2Rad(-63, 06, 0));
-    stars[5] = RaDec(MObservatory::Hms2Rad( 13, 25, 2), MObservatory::Dms2Rad(-11, 10, 0));
-    stars[6] = RaDec(MObservatory::Hms2Rad(  5, 14, 0), MObservatory::Dms2Rad(- 8, 12, 5));
-    stars[7] = RaDec(MObservatory::Hms2Rad( 19, 50, 0), MObservatory::Dms2Rad(- 8, 52, 6));
-    stars[8] = RaDec(MObservatory::Hms2Rad( 18, 37, 0), MObservatory::Dms2Rad( 38, 47, 0));
-    stars[9] = RaDec(MObservatory::Hms2Rad(  5, 16, 0), MObservatory::Dms2Rad( 46, 00, 0));
-    stars[10] = RaDec(MObservatory::Hms2Rad(  7, 39, 0), MObservatory::Dms2Rad(  5, 14, 0));
-    stars[11] = RaDec(MObservatory::Hms2Rad(  5, 55, 0), MObservatory::Dms2Rad(  7, 24, 0));
-    stars[12] = RaDec(MObservatory::Hms2Rad( 19, 50, 0), MObservatory::Dms2Rad(  8, 52, 0));
-
     for (int i=0; i<13; i++)
         SetDot(fStars[i], stars[i], 0);
-
-}
+}
+
 void MGSkyPosition::InitText()
 {
@@ -244,5 +245,5 @@
 }
 
-void MGSkyPosition::SetDot(TArc *arc, RaDec &radec, Int_t off)
+void MGSkyPosition::SetDot(TArc *arc, const RaDec &radec, Int_t off)
 {
     RaDec rd(radec.Ra()+off*360/24*kDeg2Rad, radec.Dec());
@@ -258,5 +259,5 @@
     arc->SetY1(y);
 
-    SetModified();
+    //SetModified(); ***MEMORY LEAK!!!***
 }
 
Index: trunk/MagicSoft/Cosy/gui/MGSkyPosition.h
===================================================================
--- trunk/MagicSoft/Cosy/gui/MGSkyPosition.h	(revision 1783)
+++ trunk/MagicSoft/Cosy/gui/MGSkyPosition.h	(revision 1784)
@@ -67,5 +67,5 @@
     void SetLin2(Float_t x1, Float_t y1, Float_t x2, Float_t y2);
 
-    void SetDot(TArc *arc, RaDec &radec, Int_t off);
+    void SetDot(TArc *arc, const RaDec &radec, Int_t off);
 
     void UpdateStars();
Index: trunk/MagicSoft/Mars/mtemp/MObservatory.cc
===================================================================
--- trunk/MagicSoft/Mars/mtemp/MObservatory.cc	(revision 1783)
+++ trunk/MagicSoft/Mars/mtemp/MObservatory.cc	(revision 1784)
@@ -61,6 +61,6 @@
     {
     case kMagic1:
-        fLatitude  =  Daf2rad( 28, 45, 30.0);
-        fLongitude =  Daf2rad(-17, 52, 48.0);
+        fLatitude  = Dms2Rad( 28, 45, 30.0);
+        fLongitude = Dms2Rad(-17, 52, 48.0);
         fHeight    = 2326; // m
         fObservatoryName = "Observatorio del Roque de los Muchachos (Magic1)";
@@ -68,6 +68,6 @@
 
     case kWuerzburgCity:
-        fLatitude  = Daf2rad(51, 38, 48.0);
-        fLongitude = Daf2rad( 9, 56, 36.0);
+        fLatitude  = Dms2Rad(51, 38, 48.0);
+        fLongitude = Dms2Rad( 9, 56, 36.0);
         fHeight    = 300;
         fObservatoryName = "Wuerzburg City";
Index: trunk/MagicSoft/Mars/mtemp/MObservatory.h
===================================================================
--- trunk/MagicSoft/Mars/mtemp/MObservatory.h	(revision 1783)
+++ trunk/MagicSoft/Mars/mtemp/MObservatory.h	(revision 1784)
@@ -27,11 +27,4 @@
     void Init(const char *name, const char *title);
 
-    Double_t Daf2rad(Int_t deg, UInt_t min, Double_t sec)
-    {
-        /* pi/(180*3600):  arcseconds to radians */
-#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
-        return DAS2R * (60.0 * (60.0 * (Double_t)deg + (Double_t)min) + sec);
-    }
-
 public:
     MObservatory(const char *name=NULL, const char *title=NULL);
@@ -57,4 +50,18 @@
     LocationName_t GetObservatoryKey() const { return fObservatoryKey; }
 
+    static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec)
+    {
+        /* pi/(180*3600):  arcseconds to radians */
+#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
+        return DAS2R * (60.0 * (60.0 * (Double_t)deg + (Double_t)min) + sec);
+    }
+
+    static Double_t Hms2Rad(Int_t hor, UInt_t min, Double_t sec)
+    {
+        /* pi/(12*3600):  seconds of time to radians */
+#define DS2R 7.2722052166430399038487115353692196393452995355905e-5
+        return DS2R * (60.0 * (60.0 * (Double_t)hor + (Double_t)min) + sec);
+    }
+
     ClassDef(MObservatory, 0)
 
