source: trunk/MagicSoft/Mars/mpointing/MPointingPos.h@ 5452

Last change on this file since 5452 was 5117, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.8 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...
9#ifndef MARS_MPointing
10#include "MPointing.h"
11#endif
12
13class MTime;
14class MObservatory;
15
16class MPointingPos : public MParContainer
17{
18private:
19 Double_t fZd; // [deg] Zenith distance (ZA)
20 Double_t fAz; // [deg] Azimuth
21
22 Double_t fRa; // [h] Right ascension
23 Double_t fHa; // [h] Hour angle
24 Double_t fDec; // [deg] Declination
25
26public:
27 MPointingPos(const char *name=0, const char *title=0) : fZd(0), fAz(0), fRa(0), fHa(0), fDec(0)
28 {
29 fName = name ? name : "MPointingPos";
30 fTitle = title ? title : "Container storing the (corrected) telescope pointing position";
31 }
32
33 void SetLocalPosition(Double_t zd, Double_t az) { fZd=zd; fAz=az; }
34 void SetSkyPosition(Double_t ra, Double_t dec, Double_t ha=0) { fRa=ra; fDec=dec; fHa=ha; }
35
36 Double_t GetZd() const { return fZd; }
37 Double_t GetAz() const { return fAz; }
38
39 Double_t GetZdRad() const { return fZd*TMath::DegToRad(); }
40 Double_t GetAzRad() const { return fAz*TMath::DegToRad(); }
41
42 ZdAz GetZdAz() const { return ZdAz(fZd, fAz); }
43
44 Double_t GetRa() const { return fRa; }
45 Double_t GetHa() const { return fHa; }
46 Double_t GetDec() const { return fDec; }
47
48 Double_t GetRaRad() const { return fRa*TMath::DegToRad()*15; }
49 Double_t GetDecRad() const { return fDec*TMath::DegToRad(); }
50
51 Double_t RotationAngle(const MObservatory &o) const;
52 Double_t RotationAngle(const MObservatory &o, const MTime &t) const;
53 Double_t RotationAngle(const MObservatory &o, const MTime *t) const
54 {
55 return t ? RotationAngle(o, *t) : RotationAngle(o);
56 }
57
58 ClassDef(MPointingPos, 1) //Container storing the (corrected) telescope pointing position
59};
60
61#endif
Note: See TracBrowser for help on using the repository browser.