Changeset 2891 for trunk/MagicSoft/Mars
- Timestamp:
- 01/23/04 14:47:01 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2890 r2891 4 4 5 5 -*-*- END OF LINE -*-*- 6 7 2004/01/23: Thomas Bretz 8 9 * mbase/MAstro.cc: 10 - Fixed calculation of MJD. In Ymd2Mjd a plus should be a minus. 11 12 6 13 7 14 2004/01/23: Abelardo Moralejo … … 17 24 - Added missing support for analysis of stereo files. 18 25 26 27 19 28 2004/01/23: Raquel de los Reyes 20 29 21 30 * macros/CCDataCheck.C 22 31 - Added the temperature distribution of the optical links. 32 33 23 34 24 35 2004/01/22: Abelardo Moralejo … … 46 57 histogram used in the light calibration is written to the output 47 58 file. 59 60 48 61 49 62 2004/01/22: Thomas Bretz -
trunk/MagicSoft/Mars/mbase/MAstro.cc
r2604 r2891 216 216 Int_t MAstro::Ymd2Mjd(UShort_t y, Byte_t m, Byte_t d) 217 217 { 218 // Month lengths in days219 static int months[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };218 // Month lengths in days 219 static int months[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; 220 220 221 221 // Validate month … … 230 230 return -1; 231 231 232 // Lengthen year and month numbers to avoid overflow232 // Precalculate some values 233 233 const Byte_t lm = 12-m; 234 const ULong_t lm10 = 4712 + y +lm/10;234 const ULong_t lm10 = 4712 + y - lm/10; 235 235 236 236 // Perform the conversion 237 return 1461L*lm10/4 + (306*(( 21-lm)%12)+5)/10 - (3*((lm10+188)/100))/4 + d - 2399904;238 } 237 return 1461L*lm10/4 + (306*((m+9)%12)+5)/10 - (3*((lm10+188)/100))/4 + d - 2399904; 238 }
Note:
See TracChangeset
for help on using the changeset viewer.