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

Last change on this file since 4733 was 4731, checked in by wittek, 20 years ago
*** empty log message ***
File size: 1.5 KB
Line 
1#ifndef MARS_MPointingPos
2#define MARS_MPointingPos
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MTime;
9class MObservatory;
10
11class MPointingPos : public MParContainer
12{
13private:
14 Double_t fZd; // [deg] Zenith distance (ZA)
15 Double_t fAz; // [deg] Azimuth
16
17 Double_t fRa; // [h] Right ascension
18 Double_t fHa; // [h] Hour angle
19 Double_t fDec; // [deg] Declination
20
21public:
22 MPointingPos(const char *name=0, const char *title=0)
23 {
24 fName = name ? name : "MPointingPos";
25 fTitle = title ? title : "Container storing the (corrected) telescope pointing position";
26 }
27
28 void SetLocalPosition(Double_t zd, Double_t az) { fZd=zd; fAz=az; }
29 void SetSkyPosition(Double_t ra, Double_t dec, Double_t ha=0) { fRa=ra; fDec=dec; fHa=ha; }
30
31 Double_t GetZd() const { return fZd; }
32 Double_t GetAz() const { return fAz; }
33
34 Double_t GetRa() const { return fRa; }
35 Double_t GetHa() const { return fHa; }
36 Double_t GetDec() const { return fDec; }
37
38 Double_t GetRaRad() const { return fRa*TMath::DegToRad()*15; }
39 Double_t GetDecRad() const { return fDec*TMath::DegToRad(); }
40
41 Double_t RotationAngle(const MObservatory &o) const;
42 Double_t RotationAngle(const MObservatory &o, const MTime &t) const;
43 Double_t RotationAngle(const MObservatory &o, const MTime *t) const
44 {
45 return t ? RotationAngle(o, *t) : RotationAngle(o);
46 }
47
48 ClassDef(MPointingPos, 1) //Container storing the (corrected) telescope pointing position
49};
50
51#endif
Note: See TracBrowser for help on using the repository browser.