Changeset 8765 for trunk/MagicSoft/Mars/mastro
- Timestamp:
- 10/27/07 21:59:05 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mastro
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstro.cc
r8324 r8765 323 323 // Perform the conversion 324 324 return 1461L*lm10/4 + (306*((m+9)%12)+5)/10 - (3*((lm10+188)/100))/4 + d - 2399904; 325 } 326 327 // -------------------------------------------------------------------------- 328 // 329 // Convert a mjd to a number yymmdd. The century is just cuts away, e.g. 330 // 54393 --> 71020 (2007/10/20) 331 // 50741 --> 971020 (1997/10/20) 332 // 17868 --> 71020 (1907/10/20) 333 // 334 UInt_t MAstro::Mjd2Yymmdd(UInt_t mjd) 335 { 336 UShort_t y; 337 Byte_t m, d; 338 Mjd2Ymd(mjd, y, m, d); 339 340 return d + m*100 + (y%100)*10000; 341 } 342 343 // -------------------------------------------------------------------------- 344 // 345 // Convert a yymmdd number to mjd. The century is defined as 2000 for 346 // yy<70, 1900 elsewise. 347 // 71020 --> 54393 (2007/10/20) 348 // 971020 --> 50741 (1997/10/20) 349 // 350 UInt_t MAstro::Yymmdd2Mjd(UInt_t yymmdd) 351 { 352 const Byte_t dd = yymmdd%100; 353 const Byte_t mm = (yymmdd/100)%100; 354 const UShort_t yy = (yymmdd/10000)%100; 355 356 return Ymd2Mjd(yy + (yy<70 ? 2000 : 1900), mm, dd); 325 357 } 326 358 -
trunk/MagicSoft/Mars/mastro/MAstro.h
r8324 r8765 74 74 static Int_t Ymd2Mjd(UShort_t y, Byte_t m, Byte_t d); 75 75 76 static UInt_t Mjd2Yymmdd(UInt_t mjd); 77 static UInt_t Yymmdd2Mjd(UInt_t yymmdd); 78 76 79 static Double_t UT2GMST(Double_t ut1); 77 80 -
trunk/MagicSoft/Mars/mastro/MAstroSky2Local.cc
r7217 r8765 87 87 // C = RotY(r2) (Make zenith and sky pole the same point) 88 88 // 89 // D = RotZ(180deg) (Align rot taion angle to N=0, E=90)89 // D = RotZ(180deg) (Align rotation angle to N=0, E=90) 90 90 // 91 91 // with
Note:
See TracChangeset
for help on using the changeset viewer.