Ignore:
Timestamp:
12/07/03 14:48:11 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/catalog
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/catalog/SlaStars.cc

    r1758 r2615  
    3131}
    3232
    33 void SlaStars::SetMjd(const double mjd)
     33void SlaStars::SetMjd(double mjd)
    3434{
    3535    Slalib::SetMjd(mjd);
  • trunk/MagicSoft/Cosy/catalog/SlaStars.h

    r1953 r2615  
    2323    //    const RaDec GetRaDec() const { return fRaDec*360/D2PI; }
    2424
    25     virtual void SetMjd(const double mjd);
     25    virtual void SetMjd(double mjd);
    2626
    2727    void   Set(const AltAz &altaz);
  • trunk/MagicSoft/Cosy/catalog/Slalib.cc

    r2280 r2615  
    1010ClassImp(Slalib);
    1111
    12 Slalib::Slalib(MObservatory::LocationName_t key) : Timer(), MObservatory(key)
    13 {
    14 }
    15 
    16 Slalib::~Slalib()
     12Slalib::Slalib(MObservatory::LocationName_t key) : MObservatory(key)
    1713{
    1814}
     
    3228void Slalib::SetMjd(double mjd)
    3329{
    34     Timer::SetMjd(mjd);
     30    fTime.SetMjd(mjd);
    3531    fAlpha = slaGmst(mjd) + GetElong();
    3632}
     
    5753    return ZdAz(kPiDiv2-alt, az);
    5854}
    59 
     55/*
    6056Double_t Slalib::Hms2Sec(Int_t deg, UInt_t min, Double_t sec, Char_t sgn)
    6157{
     
    6662Double_t Slalib::Dms2Rad(Int_t deg, UInt_t min, Double_t sec, Char_t sgn)
    6763{
    68     /* pi/(180*3600):  arcseconds to radians */
     64    // pi/(180*3600):  arcseconds to radians
    6965#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
    7066    return Hms2Sec(deg, min, sec, sgn)*DAS2R;
     
    7369Double_t Slalib::Hms2Rad(Int_t hor, UInt_t min, Double_t sec, Char_t sgn)
    7470{
    75     /* pi/(12*3600):  seconds of time to radians */
     71    // pi/(12*3600):  seconds of time to radians
    7672#define DS2R 7.2722052166430399038487115353692196393452995355905e-5
    7773    return Hms2Sec(hor, min, sec, sgn)*DS2R;
     
    10096void Slalib::Day2Hms(Double_t day, Char_t &sgn, UShort_t &hor, UShort_t &min, UShort_t &sec)
    10197{
    102     /* Handle sign */
     98    // Handle sign
    10399    sgn = day<0?'-':'+';
    104100
    105     /* Round interval and express in smallest units required */
     101    // Round interval and express in smallest units required
    106102    Double_t a = Round(86400. * TMath::Abs(day)); // Days to seconds
    107103
    108     /* Separate into fields */
     104    // Separate into fields
    109105    const Double_t ah = Trunc(a/3600.);
    110106    a -= ah * 3600.;
     
    113109    const Double_t as = Trunc(a);
    114110
    115     /* Return results */
     111    // Return results
    116112    hor = (UShort_t)ah;
    117113    min = (UShort_t)am;
     
    151147void Slalib::Day2Hm(Double_t day, Char_t &sgn, UShort_t &hor, Double_t &min)
    152148{
    153     /* Handle sign */
     149    // Handle sign
    154150    sgn = day<0?'-':'+';
    155151
    156     /* Round interval and express in smallest units required */
     152    // Round interval and express in smallest units required
    157153    Double_t a = Round(86400. * TMath::Abs(day)); // Days to seconds
    158154
    159     /* Separate into fields */
     155    // Separate into fields
    160156    const Double_t ah = Trunc(a/3600.);
    161157    a -= ah * 3600.;
    162158
    163     /* Return results */
     159    // Return results
    164160    hor = (UShort_t)ah;
    165161    min = a/60.;
     
    196192}
    197193
     194*/
  • trunk/MagicSoft/Cosy/catalog/Slalib.h

    r2280 r2615  
    55
    66#include "coord.h"
    7 #include "timer.h"
     7#include "MTime.h"
    88#include "MObservatory.h"
    99
    10 class Slalib : public Timer, public MObservatory
     10class Slalib : public MObservatory
    1111{
    1212private:
     13    MTime fTime;
     14
    1315    double fAlpha;
    1416
     
    1820public:
    1921    Slalib(MObservatory::LocationName_t key);
    20     virtual ~Slalib();
    21 
    22     static Double_t Hms2Sec(Int_t deg, UInt_t min, Double_t sec, char sgn='+');
    23     static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');
    24     static Double_t Hms2Rad(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');
    25     static Double_t Dms2Deg(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');
    26     static Double_t Hms2Deg(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');
    27     static Double_t Dms2Hor(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');
    28     static Double_t Hms2Hor(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');
    29 
    30     static void Day2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    31     static void Rad2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    32     static void Rad2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    33     static void Deg2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    34     static void Deg2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    35     static void Hor2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    36     static void Hor2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
    37 
    38     static void Day2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    39     static void Rad2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    40     static void Rad2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    41     static void Deg2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    42     static void Deg2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    43     static void Hor2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    44     static void Hor2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
    4522
    4623    virtual void SetMjd(double mjd);
     24    Double_t GetMjd() const { return fTime.GetMjd(); }
     25    void Now() { fTime.Now(); }
     26    const MTime &GetTime() const { return fTime; }
    4727
    4828    double GetAlpha() const  { return fAlpha; }
Note: See TracChangeset for help on using the changeset viewer.