Ignore:
Timestamp:
02/07/05 11:48:14 (20 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

    r4966 r6277  
    241241    ret = Dms2Deg(d, m, s, sgn);
    242242    return kTRUE;
     243}
     244
     245// --------------------------------------------------------------------------
     246//
     247// Returns val=-12.5 as string '-12:30:00'
     248//
     249TString MAstro::Angle2Coordinate(Double_t val)
     250{
     251    Char_t  sgn;
     252    UShort_t d,m,s;
     253
     254    Deg2Dms(val, sgn, d, m, s);
     255
     256    return Form("%c%02d:%02d:%02d", sgn, d, m, s);
    243257}
    244258
  • trunk/MagicSoft/Mars/mastro/MAstro.h

    r4966 r6277  
    2929    static Double_t Hms2Hor(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');
    3030
    31     static void Day2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
     31    static void Day2Hms(Double_t day, Char_t &sgn, UShort_t &hor, UShort_t &min, UShort_t &sec);
    3232    static void Rad2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    33     static void Rad2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    34     static void Deg2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    35     static void Deg2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    36     static void Hor2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    37     static void Hor2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
     33    static void Rad2Hms(Double_t rad, Char_t &sgn, UShort_t &hor, UShort_t &min, UShort_t &sec);
     34    static void Deg2Dms(Double_t deg, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
     35    static void Deg2Hms(Double_t deg, Char_t &sgn, UShort_t &hor, UShort_t &min, UShort_t &sec);
     36    static void Hor2Dms(Double_t hor, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
     37    static void Hor2Hms(Double_t hor, Char_t &sgn, UShort_t &hor, UShort_t &min, UShort_t &sec);
    3838
    39     static void Day2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
     39    static void Day2Hm(Double_t day, Char_t &sgn, UShort_t &hor, Double_t &min);
    4040    static void Rad2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    41     static void Rad2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    42     static void Deg2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    43     static void Deg2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
     41    static void Rad2Hm(Double_t rad, Char_t &sgn, UShort_t &hor, Double_t &min);
     42    static void Deg2Dm(Double_t deg, Char_t &sgn, UShort_t &deg, Double_t &min);
     43    static void Deg2Hm(Double_t deg, Char_t &sgn, UShort_t &hor, Double_t &min);
    4444    static void Hor2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    45     static void Hor2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
     45    static void Hor2Hm(Double_t rad, Char_t &sgn, UShort_t &hor, Double_t &min);
    4646
    4747    // Angle treatment functions
    48     static Bool_t String2Angle(TString &str, Double_t &ret);
    49     static Bool_t Coordinate2Angle(const TString &str, Double_t &ret);
     48    static Bool_t  String2Angle(TString &str, Double_t &ret);
     49    static Bool_t  Coordinate2Angle(const TString &str, Double_t &ret);
     50    static TString Angle2Coordinate(Double_t val);
    5051
    5152    static Double_t AngularDistance(Double_t theta0, Double_t phi0, Double_t theta1, Double_t phi1);
Note: See TracChangeset for help on using the changeset viewer.