Changeset 1784
- Timestamp:
- 02/21/03 19:40:04 (22 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Changelog
r1760 r1784 1 1 -*-*- END -*-*- 2 2003/02/21 - Thomas Bretz (La Palma): 3 4 * gui/MGSkyPosition.[h,cc]: 5 - some changes trying to get rid of a strange memory leak 6 7 * candrv/nodedrv.cc: 8 - changed output 9 10 * catalog/Slalib.h: 11 - added Hms2DegRad and Dms2Rad 12 13 2 14 2003/02/16 - Thomas Bretz (La Palma): 3 15 -
trunk/MagicSoft/Cosy/candrv/nodedrv.cc
r1727 r1784 154 154 155 155 lout << hex << setfill('0'); 156 lout << " Sdo=" << idx << "/" << (int)subidx << " set.";156 lout << "Node #" << (int)fId << ": Sdo=" << idx << "/" << (int)subidx << " set."; 157 157 lout << endl; 158 158 -
trunk/MagicSoft/Cosy/catalog/Slalib.h
r1758 r1784 17 17 virtual ~Slalib(); 18 18 19 static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec) 20 { 21 /* pi/(180*3600): arcseconds to radians */ 22 #define DAS2R 4.8481368110953599358991410235794797595635330237270e-6 23 return DAS2R * (60.0 * (60.0 * (Double_t)deg + (Double_t)min) + sec); 24 } 25 26 static Double_t Hms2Rad(Int_t hor, UInt_t min, Double_t sec) 27 { 28 /* pi/(12*3600): seconds of time to radians */ 29 #define DS2R 7.2722052166430399038487115353692196393452995355905e-5 30 return DS2R * (60.0 * (60.0 * (Double_t)hor + (Double_t)min) + sec); 31 } 32 19 33 virtual void SetMjd(double mjd); 20 34 -
trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
r1760 r1784 72 72 { 73 73 fStars[i] = new TArc(0, 0, 1); 74 InitArc(fStars[i], 1001, kWhite, kWhite);74 InitArc(fStars[i], 1001, 17, 15); 75 75 fList->Add(fStars[i]); 76 76 } … … 104 104 } 105 105 106 static const RaDec stars[13] = 107 { 108 // 32349 Sirius -1.44 1.45 2.64 0.009 A0m 109 (RaDec(Slalib::Hms2Rad( 6, 45, 0), Slalib::Dms2Rad(-16, 42, 0))), 110 // 30438 Canopus -0.62 -5.53 95.88 0.164 F0Ib 111 (RaDec(Slalib::Hms2Rad( 6, 23, 0), Slalib::Dms2Rad(-52, 41, 0))), 112 // 69673 Arcturus -0.05 -0.31 11.25 1.239 K2IIIp 113 (RaDec(Slalib::Hms2Rad( 14, 15, 0), Slalib::Dms2Rad( 19, 10, 0))), 114 (RaDec(Slalib::Hms2Rad( 01, 37, 6), Slalib::Dms2Rad(-57, 14, 0))), 115 (RaDec(Slalib::Hms2Rad( 12, 26, 6), Slalib::Dms2Rad(-63, 06, 0))), 116 (RaDec(Slalib::Hms2Rad( 13, 25, 2), Slalib::Dms2Rad(-11, 10, 0))), 117 (RaDec(Slalib::Hms2Rad( 5, 14, 0), Slalib::Dms2Rad(- 8, 12, 5))), 118 (RaDec(Slalib::Hms2Rad( 19, 50, 0), Slalib::Dms2Rad(- 8, 52, 6))), 119 (RaDec(Slalib::Hms2Rad( 18, 37, 0), Slalib::Dms2Rad( 38, 47, 0))), 120 (RaDec(Slalib::Hms2Rad( 5, 16, 0), Slalib::Dms2Rad( 46, 00, 0))), 121 (RaDec(Slalib::Hms2Rad( 7, 39, 0), Slalib::Dms2Rad( 5, 14, 0))), 122 (RaDec(Slalib::Hms2Rad( 5, 55, 0), Slalib::Dms2Rad( 7, 24, 0))), 123 (RaDec(Slalib::Hms2Rad( 19, 50, 0), Slalib::Dms2Rad( 8, 52, 0))) 124 }; 125 106 126 void MGSkyPosition::UpdateStars() 107 127 { 108 RaDec stars[13];109 110 // 32349 Sirius -1.44 1.45 2.64 0.009 A0m111 stars[0] = RaDec(MObservatory::Hms2Rad( 6, 45, 0), MObservatory::Dms2Rad(-16, 42, 0));112 // 30438 Canopus -0.62 -5.53 95.88 0.164 F0Ib113 stars[1] = RaDec(MObservatory::Hms2Rad( 6, 23, 0), MObservatory::Dms2Rad(-52, 41, 0));114 // 69673 Arcturus -0.05 -0.31 11.25 1.239 K2IIIp115 stars[2] = RaDec(MObservatory::Hms2Rad( 14, 15, 0), MObservatory::Dms2Rad( 19, 10, 0));116 stars[3] = RaDec(MObservatory::Hms2Rad( 01, 37, 6), MObservatory::Dms2Rad(-57, 14, 0));117 stars[4] = RaDec(MObservatory::Hms2Rad( 12, 26, 6), MObservatory::Dms2Rad(-63, 06, 0));118 stars[5] = RaDec(MObservatory::Hms2Rad( 13, 25, 2), MObservatory::Dms2Rad(-11, 10, 0));119 stars[6] = RaDec(MObservatory::Hms2Rad( 5, 14, 0), MObservatory::Dms2Rad(- 8, 12, 5));120 stars[7] = RaDec(MObservatory::Hms2Rad( 19, 50, 0), MObservatory::Dms2Rad(- 8, 52, 6));121 stars[8] = RaDec(MObservatory::Hms2Rad( 18, 37, 0), MObservatory::Dms2Rad( 38, 47, 0));122 stars[9] = RaDec(MObservatory::Hms2Rad( 5, 16, 0), MObservatory::Dms2Rad( 46, 00, 0));123 stars[10] = RaDec(MObservatory::Hms2Rad( 7, 39, 0), MObservatory::Dms2Rad( 5, 14, 0));124 stars[11] = RaDec(MObservatory::Hms2Rad( 5, 55, 0), MObservatory::Dms2Rad( 7, 24, 0));125 stars[12] = RaDec(MObservatory::Hms2Rad( 19, 50, 0), MObservatory::Dms2Rad( 8, 52, 0));126 127 128 for (int i=0; i<13; i++) 128 129 SetDot(fStars[i], stars[i], 0); 129 130 } 130 } 131 131 132 void MGSkyPosition::InitText() 132 133 { … … 244 245 } 245 246 246 void MGSkyPosition::SetDot(TArc *arc, RaDec &radec, Int_t off)247 void MGSkyPosition::SetDot(TArc *arc, const RaDec &radec, Int_t off) 247 248 { 248 249 RaDec rd(radec.Ra()+off*360/24*kDeg2Rad, radec.Dec()); … … 258 259 arc->SetY1(y); 259 260 260 SetModified();261 //SetModified(); ***MEMORY LEAK!!!*** 261 262 } 262 263 -
trunk/MagicSoft/Cosy/gui/MGSkyPosition.h
r1760 r1784 67 67 void SetLin2(Float_t x1, Float_t y1, Float_t x2, Float_t y2); 68 68 69 void SetDot(TArc *arc, RaDec &radec, Int_t off);69 void SetDot(TArc *arc, const RaDec &radec, Int_t off); 70 70 71 71 void UpdateStars(); -
trunk/MagicSoft/Mars/mtemp/MObservatory.cc
r1758 r1784 61 61 { 62 62 case kMagic1: 63 fLatitude = Daf2rad( 28, 45, 30.0);64 fLongitude = Daf2rad(-17, 52, 48.0);63 fLatitude = Dms2Rad( 28, 45, 30.0); 64 fLongitude = Dms2Rad(-17, 52, 48.0); 65 65 fHeight = 2326; // m 66 66 fObservatoryName = "Observatorio del Roque de los Muchachos (Magic1)"; … … 68 68 69 69 case kWuerzburgCity: 70 fLatitude = D af2rad(51, 38, 48.0);71 fLongitude = D af2rad( 9, 56, 36.0);70 fLatitude = Dms2Rad(51, 38, 48.0); 71 fLongitude = Dms2Rad( 9, 56, 36.0); 72 72 fHeight = 300; 73 73 fObservatoryName = "Wuerzburg City"; -
trunk/MagicSoft/Mars/mtemp/MObservatory.h
r1758 r1784 27 27 void Init(const char *name, const char *title); 28 28 29 Double_t Daf2rad(Int_t deg, UInt_t min, Double_t sec)30 {31 /* pi/(180*3600): arcseconds to radians */32 #define DAS2R 4.8481368110953599358991410235794797595635330237270e-633 return DAS2R * (60.0 * (60.0 * (Double_t)deg + (Double_t)min) + sec);34 }35 36 29 public: 37 30 MObservatory(const char *name=NULL, const char *title=NULL); … … 57 50 LocationName_t GetObservatoryKey() const { return fObservatoryKey; } 58 51 52 static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec) 53 { 54 /* pi/(180*3600): arcseconds to radians */ 55 #define DAS2R 4.8481368110953599358991410235794797595635330237270e-6 56 return DAS2R * (60.0 * (60.0 * (Double_t)deg + (Double_t)min) + sec); 57 } 58 59 static Double_t Hms2Rad(Int_t hor, UInt_t min, Double_t sec) 60 { 61 /* pi/(12*3600): seconds of time to radians */ 62 #define DS2R 7.2722052166430399038487115353692196393452995355905e-5 63 return DS2R * (60.0 * (60.0 * (Double_t)hor + (Double_t)min) + sec); 64 } 65 59 66 ClassDef(MObservatory, 0) 60 67
Note:
See TracChangeset
for help on using the changeset viewer.