Changeset 7366 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 09/27/05 14:38:40 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MTime.cc
r4920 r7366 124 124 MAstro::Mjd2Ymd(fMjd, y, m, d); 125 125 } 126 127 // -------------------------------------------------------------------------- 128 // 129 // GetMoonPhase - calculate phase of moon as a fraction: 130 // Returns -1 if calculation failed 131 // 132 // see MAstro::GetMoonPhase 133 // 134 Double_t MTime::GetMoonPhase() const 135 { 136 return MAstro::GetMoonPhase(GetMjd()); 137 } 138 139 // -------------------------------------------------------------------------- 140 // 141 // Calculate the Period to which the time belongs to. The Period is defined 142 // as the number of synodic months ellapsed since the first full moon 143 // after Jan 1st 1980 (which was @ MJD=44240.37917) 144 // 145 // see MAstro::GetMoonPeriod 146 // 147 Double_t MTime::GetMoonPeriod() const 148 { 149 return MAstro::GetMoonPeriod(GetMjd()); 150 } 151 152 // -------------------------------------------------------------------------- 153 // 154 // To get the moon period as defined for MAGIC observation we take the 155 // nearest integer mjd, eg: 156 // 53257.8 --> 53258 157 // 53258.3 --> 53258 158 // Which is the time between 13h and 12:59h of the following day. To 159 // this day-period we assign the moon-period at midnight. To get 160 // the MAGIC definition we now substract 284. 161 // 162 // For MAGIC observation period do eg: 163 // GetMagicPeriod(53257.91042) 164 // or 165 // MTime t; 166 // t.SetMjd(53257.91042); 167 // GetMagicPeriod(t.GetMjd()); 168 // or 169 // MTime t; 170 // t.Set(2004, 1, 1, 12, 32, 11); 171 // GetMagicPeriod(t.GetMjd()); 172 // 173 // 174 // see MAstro::GetMagicPeriod 175 // 176 Int_t MTime::GetMagicPeriod() const 177 { 178 return MAstro::GetMagicPeriod(GetMjd()); 179 } 180 126 181 127 182 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/MTime.h
r5061 r7366 100 100 TTime GetRootTime() const; 101 101 Double_t GetAxisTime() const; 102 Double_t GetMoonPhase() const; 103 Double_t GetMoonPeriod() const; 104 Int_t GetMagicPeriod() const; 102 105 Long_t GetTime() const { return (Long_t)fTime; } // [ms] Time of Day returned in the range [-11h, 13h) 103 106 void GetTime(Byte_t &h, Byte_t &m, Byte_t &s, UShort_t &ms) const;
Note:
See TracChangeset
for help on using the changeset viewer.