source: trunk/Mars/mpointing/MPointingPos.h@ 11447

Last change on this file since 11447 was 9374, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.3 KB
Line 
1#ifndef MARS_MPointingPos
2#define MARS_MPointingPos
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8// FIXME: Should not be here... (ZdAz)
9#ifndef MARS_MPointing
10#include "MPointing.h"
11#endif
12
13class MTime;
14class MObservatory;
15class MPointingDev;
16
17class MPointingPos : public MParContainer
18{
19private:
20 static const TString gsDefName;
21 static const TString gsDefTitle;
22
23 Double_t fZd; // [deg] Zenith distance (ZA)
24 Double_t fAz; // [deg] Azimuth
25
26 Double_t fRa; // [h] Right ascension
27 Double_t fHa; // [h] Hour angle
28 Double_t fDec; // [deg] Declination
29
30 // Hour angle!
31 // Angle to magnetic field!
32
33public:
34 MPointingPos(const char *name=0, const char *title=0) : fZd(0), fAz(0), fRa(0), fHa(0), fDec(0)
35 {
36 fName = name ? (TString)name : gsDefName;
37 fTitle = title ? (TString)title : gsDefTitle;
38 }
39 MPointingPos(const MPointingPos &p) : MParContainer(p),
40 fZd(p.fZd), fAz(p.fAz), fRa(p.fRa), fHa(p.fHa), fDec(p.fDec)
41 {
42 }
43
44 Bool_t IsInitialized() const { return !(fZd==0 && fAz==0 && fRa==0 && fHa==0 && fDec==0); }
45
46 void Print(Option_t *o="") const;
47
48 TString GetString(Option_t *o="") const;
49
50 void SetLocalPosition(Double_t zd, Double_t az) { fZd=zd; fAz=az; }
51 void SetSkyPosition(Double_t ra, Double_t dec, Double_t ha=0) { fRa=ra; fDec=dec; fHa=ha; }
52
53 Double_t GetZd() const { return fZd; }
54 Double_t GetAz() const { return fAz; }
55
56 Double_t GetZdRad() const;// { return fZd*TMath::DegToRad(); }
57 Double_t GetAzRad() const;// { return fAz*TMath::DegToRad(); }
58
59 ZdAz GetZdAz() const { return ZdAz(fZd, fAz); }
60
61 Double_t GetRa() const { return fRa; }
62 Double_t GetHa() const { return fHa; }
63 Double_t GetDec() const { return fDec; }
64
65 Double_t GetRaRad() const;// { return fRa*TMath::DegToRad()*15; }
66 Double_t GetDecRad() const;// { return fDec*TMath::DegToRad(); }
67
68 Double_t RotationAngle(const MObservatory &o) const;
69 Double_t RotationAngle(const MObservatory &o, const MTime &t, const MPointingDev *dev=0) const;
70 Double_t RotationAngle(const MObservatory &o, const MTime *t) const
71 {
72 return t ? RotationAngle(o, *t) : RotationAngle(o);
73 }
74
75 ClassDef(MPointingPos, 1) //Container storing the (corrected) telescope pointing position
76};
77
78#endif
Note: See TracBrowser for help on using the repository browser.