Ignore:
Timestamp:
10/27/07 21:59:05 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mastro
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mastro/MAstro.cc

    r8324 r8765  
    323323    // Perform the conversion
    324324    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//
     334UInt_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//
     350UInt_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);
    325357}
    326358
  • trunk/MagicSoft/Mars/mastro/MAstro.h

    r8324 r8765  
    7474    static Int_t Ymd2Mjd(UShort_t y, Byte_t m, Byte_t d);
    7575
     76    static UInt_t Mjd2Yymmdd(UInt_t mjd);
     77    static UInt_t Yymmdd2Mjd(UInt_t yymmdd);
     78
    7679    static Double_t UT2GMST(Double_t ut1);
    7780
  • trunk/MagicSoft/Mars/mastro/MAstroSky2Local.cc

    r7217 r8765  
    8787//   C = RotY(r2)     (Make zenith and sky pole the same point)
    8888//
    89 //   D = RotZ(180deg) (Align rottaion angle to N=0, E=90)
     89//   D = RotZ(180deg) (Align rotation angle to N=0, E=90)
    9090//
    9191// with
Note: See TracChangeset for help on using the changeset viewer.