Changeset 2615 for trunk/MagicSoft/Cosy/catalog
- Timestamp:
- 12/07/03 14:48:11 (21 years ago)
- Location:
- trunk/MagicSoft/Cosy/catalog
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/catalog/SlaStars.cc
r1758 r2615 31 31 } 32 32 33 void SlaStars::SetMjd( constdouble mjd)33 void SlaStars::SetMjd(double mjd) 34 34 { 35 35 Slalib::SetMjd(mjd); -
trunk/MagicSoft/Cosy/catalog/SlaStars.h
r1953 r2615 23 23 // const RaDec GetRaDec() const { return fRaDec*360/D2PI; } 24 24 25 virtual void SetMjd( constdouble mjd);25 virtual void SetMjd(double mjd); 26 26 27 27 void Set(const AltAz &altaz); -
trunk/MagicSoft/Cosy/catalog/Slalib.cc
r2280 r2615 10 10 ClassImp(Slalib); 11 11 12 Slalib::Slalib(MObservatory::LocationName_t key) : Timer(), MObservatory(key) 13 { 14 } 15 16 Slalib::~Slalib() 12 Slalib::Slalib(MObservatory::LocationName_t key) : MObservatory(key) 17 13 { 18 14 } … … 32 28 void Slalib::SetMjd(double mjd) 33 29 { 34 Timer::SetMjd(mjd);30 fTime.SetMjd(mjd); 35 31 fAlpha = slaGmst(mjd) + GetElong(); 36 32 } … … 57 53 return ZdAz(kPiDiv2-alt, az); 58 54 } 59 55 /* 60 56 Double_t Slalib::Hms2Sec(Int_t deg, UInt_t min, Double_t sec, Char_t sgn) 61 57 { … … 66 62 Double_t Slalib::Dms2Rad(Int_t deg, UInt_t min, Double_t sec, Char_t sgn) 67 63 { 68 / * pi/(180*3600): arcseconds to radians */64 // pi/(180*3600): arcseconds to radians 69 65 #define DAS2R 4.8481368110953599358991410235794797595635330237270e-6 70 66 return Hms2Sec(deg, min, sec, sgn)*DAS2R; … … 73 69 Double_t Slalib::Hms2Rad(Int_t hor, UInt_t min, Double_t sec, Char_t sgn) 74 70 { 75 / * pi/(12*3600): seconds of time to radians */71 // pi/(12*3600): seconds of time to radians 76 72 #define DS2R 7.2722052166430399038487115353692196393452995355905e-5 77 73 return Hms2Sec(hor, min, sec, sgn)*DS2R; … … 100 96 void Slalib::Day2Hms(Double_t day, Char_t &sgn, UShort_t &hor, UShort_t &min, UShort_t &sec) 101 97 { 102 / * Handle sign */98 // Handle sign 103 99 sgn = day<0?'-':'+'; 104 100 105 / * Round interval and express in smallest units required */101 // Round interval and express in smallest units required 106 102 Double_t a = Round(86400. * TMath::Abs(day)); // Days to seconds 107 103 108 / * Separate into fields */104 // Separate into fields 109 105 const Double_t ah = Trunc(a/3600.); 110 106 a -= ah * 3600.; … … 113 109 const Double_t as = Trunc(a); 114 110 115 / * Return results */111 // Return results 116 112 hor = (UShort_t)ah; 117 113 min = (UShort_t)am; … … 151 147 void Slalib::Day2Hm(Double_t day, Char_t &sgn, UShort_t &hor, Double_t &min) 152 148 { 153 / * Handle sign */149 // Handle sign 154 150 sgn = day<0?'-':'+'; 155 151 156 / * Round interval and express in smallest units required */152 // Round interval and express in smallest units required 157 153 Double_t a = Round(86400. * TMath::Abs(day)); // Days to seconds 158 154 159 / * Separate into fields */155 // Separate into fields 160 156 const Double_t ah = Trunc(a/3600.); 161 157 a -= ah * 3600.; 162 158 163 / * Return results */159 // Return results 164 160 hor = (UShort_t)ah; 165 161 min = a/60.; … … 196 192 } 197 193 194 */ -
trunk/MagicSoft/Cosy/catalog/Slalib.h
r2280 r2615 5 5 6 6 #include "coord.h" 7 #include " timer.h"7 #include "MTime.h" 8 8 #include "MObservatory.h" 9 9 10 class Slalib : public Timer, publicMObservatory10 class Slalib : public MObservatory 11 11 { 12 12 private: 13 MTime fTime; 14 13 15 double fAlpha; 14 16 … … 18 20 public: 19 21 Slalib(MObservatory::LocationName_t key); 20 virtual ~Slalib();21 22 static Double_t Hms2Sec(Int_t deg, UInt_t min, Double_t sec, char sgn='+');23 static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');24 static Double_t Hms2Rad(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');25 static Double_t Dms2Deg(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');26 static Double_t Hms2Deg(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');27 static Double_t Dms2Hor(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');28 static Double_t Hms2Hor(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');29 30 static void Day2Hms(Double_t rad, Char_t &sgn, UShort_t °, UShort_t &min, UShort_t &sec);31 static void Rad2Dms(Double_t rad, Char_t &sgn, UShort_t °, UShort_t &min, UShort_t &sec);32 static void Rad2Hms(Double_t rad, Char_t &sgn, UShort_t °, UShort_t &min, UShort_t &sec);33 static void Deg2Dms(Double_t rad, Char_t &sgn, UShort_t °, UShort_t &min, UShort_t &sec);34 static void Deg2Hms(Double_t rad, Char_t &sgn, UShort_t °, UShort_t &min, UShort_t &sec);35 static void Hor2Dms(Double_t rad, Char_t &sgn, UShort_t °, UShort_t &min, UShort_t &sec);36 static void Hor2Hms(Double_t rad, Char_t &sgn, UShort_t °, UShort_t &min, UShort_t &sec);37 38 static void Day2Hm(Double_t rad, Char_t &sgn, UShort_t °, Double_t &min);39 static void Rad2Dm(Double_t rad, Char_t &sgn, UShort_t °, Double_t &min);40 static void Rad2Hm(Double_t rad, Char_t &sgn, UShort_t °, Double_t &min);41 static void Deg2Dm(Double_t rad, Char_t &sgn, UShort_t °, Double_t &min);42 static void Deg2Hm(Double_t rad, Char_t &sgn, UShort_t °, Double_t &min);43 static void Hor2Dm(Double_t rad, Char_t &sgn, UShort_t °, Double_t &min);44 static void Hor2Hm(Double_t rad, Char_t &sgn, UShort_t °, Double_t &min);45 22 46 23 virtual void SetMjd(double mjd); 24 Double_t GetMjd() const { return fTime.GetMjd(); } 25 void Now() { fTime.Now(); } 26 const MTime &GetTime() const { return fTime; } 47 27 48 28 double GetAlpha() const { return fAlpha; }
Note:
See TracChangeset
for help on using the changeset viewer.