source: trunk/MagicSoft/Mars/mastro/MAstro.h@ 4618

Last change on this file since 4618 was 4566, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 3.0 KB
Line 
1#ifndef MARS_MAstro
2#define MARS_MAstro
3
4#ifndef ROOT_TROOT
5#include <TROOT.h>
6#endif
7
8class MAstro
9{
10private:
11 static Double_t Round(Double_t val);
12 static Double_t Trunc(Double_t val);
13
14 static Double_t Kepler(Double_t m, Double_t ecc);
15
16public:
17 // Angle/Time conversion functions
18 static Double_t Hms2Sec(Int_t deg, UInt_t min, Double_t sec, char sgn='+');
19 static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');
20 static Double_t Hms2Rad(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');
21 static Double_t Dms2Deg(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');
22 static Double_t Hms2Deg(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');
23 static Double_t Dms2Hor(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');
24 static Double_t Hms2Hor(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');
25
26 static void Day2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
27 static void Rad2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
28 static void Rad2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
29 static void Deg2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
30 static void Deg2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
31 static void Hor2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
32 static void Hor2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
33
34 static void Day2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
35 static void Rad2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
36 static void Rad2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
37 static void Deg2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
38 static void Deg2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
39 static void Hor2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
40 static void Hor2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
41
42 // Angle treatment functions
43 static Bool_t String2Angle(TString &str, Double_t &ret);
44 static Bool_t Coordinate2Angle(const TString &str, Double_t &ret);
45
46 static Double_t AngularDistance(Double_t theta0, Double_t phi0, Double_t theta1, Double_t phi1);
47
48 // Time treatment functions
49 static void Mjd2Ymd(UInt_t mjd, UShort_t &y, Byte_t &m, Byte_t &d);
50 static Int_t Ymd2Mjd(UShort_t y, Byte_t m, Byte_t d);
51
52 static Double_t UT2GMST(Double_t ut1);
53
54 // Rotation angle between local and sky coordinate system
55 static void RotationAngle(Double_t sinl, Double_t cosl, Double_t theta, Double_t phi, Double_t &sin, Double_t &cos);
56 static Double_t RotationAngle(Double_t sinl, Double_t cosl, Double_t theta, Double_t phi);
57
58 static Double_t GetMoonPhase(Double_t mjd);
59 static Double_t GetMoonPeriod(Double_t mjd);
60 static Int_t GetMagicPeriod(Double_t mjd);
61
62 ClassDef(MAstro, 0)
63};
64
65#endif
Note: See TracBrowser for help on using the repository browser.