Ignore:
Timestamp:
03/01/04 15:33:06 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mastro
Files:
2 edited

Legend:

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

    r3366 r3371  
    1818!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2003
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
     
    3333#include <TVector3.h> // TVector3
    3434
     35#include "MTime.h"    // MTime::GetGmst
     36
    3537ClassImp(MAstro);
    3638
     
    5658{
    5759    /* pi/(180*3600):  arcseconds to radians */
    58 #define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
    59     return Hms2Sec(deg, min, sec, sgn)*DAS2R;
     60    //#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
     61    return Hms2Sec(deg, min, sec, sgn)*TMath::Pi()/(180*3600)/**DAS2R*/;
    6062}
    6163
     
    6365{
    6466    /* pi/(12*3600):  seconds of time to radians */
    65 #define DS2R 7.2722052166430399038487115353692196393452995355905e-5
    66     return Hms2Sec(hor, min, sec, sgn)*DS2R;
     67//#define DS2R 7.2722052166430399038487115353692196393452995355905e-5
     68    return Hms2Sec(hor, min, sec, sgn)*TMath::Pi()/(12*3600)/**DS2R*/;
    6769}
    6870
     
    295297    return v0.Angle(v1);
    296298}
     299
     300// --------------------------------------------------------------------------
     301//
     302// Calls MTime::GetGmst() Better use MTime::GetGmst() directly
     303//
     304Double_t MAstro::UT2GMST(Double_t ut1)
     305{
     306    return MTime(ut1).GetGmst();
     307}
  • trunk/MagicSoft/Mars/mastro/MAstro.h

    r3366 r3371  
    1313
    1414public:
     15    // Angle/Time conversion functions
    1516    static Double_t Hms2Sec(Int_t deg, UInt_t min, Double_t sec, char sgn='+');
    1617    static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');
     
    3738    static void Hor2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    3839
     40    // Angle treatment functions
    3941    static Bool_t String2Angle(TString &str, Double_t &ret);
    4042    static Bool_t Coordinate2Angle(const TString &str, Double_t &ret);
    4143
    4244    static Double_t AngularDistance(Double_t theta0, Double_t phi0, Double_t theta1, Double_t phi1);
    43  
     45
     46    // Time treatment functions
    4447    static void  Mjd2Ymd(UInt_t mjd, UShort_t &y, Byte_t &m, Byte_t &d);
    4548    static Int_t Ymd2Mjd(UShort_t y, Byte_t m, Byte_t d);
     49
     50    static Double_t UT2GMST(Double_t ut1);
    4651
    4752    ClassDef(MAstro, 0)
Note: See TracChangeset for help on using the changeset viewer.