Changeset 3497 for trunk/MagicSoft/Mars/mastro
- Timestamp:
- 03/15/04 12:04:09 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mastro
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MObservatory.cc
r3366 r3497 34 34 #include "MObservatory.h" 35 35 36 #include <TVector3.h> 37 38 #include "MTime.h" 36 39 #include "MAstro.h" 37 40 … … 169 172 return TMath::ASin((fCosLatitude*sinp) / denom); 170 173 } 174 175 // -------------------------------------------------------------------------- 176 // 177 // RotationAngle 178 // 179 // calculates the angle for the rotation of the sky image in the camera; 180 // this angle is a function of the sky coordinates, the observatory 181 // location and the time 182 // 183 // ra [rad]: Right ascension 184 // dec [rad]: Declination 185 // 186 // Return RotationAngle in rad 187 // 188 Double_t MObservatory::RotationAngle(Double_t ra, Double_t dec, const MTime &t) const 189 { 190 const Double_t alpha = t.GetGmst() + GetElong(); 191 192 TVector3 v; 193 v.SetMagThetaPhi(1, TMath::Pi()/2-dec, alpha-ra); 194 v.RotateY(GetPhi()-TMath::Pi()/2); 195 196 return RotationAngle(v.Theta(), v.Phi()); 197 } -
trunk/MagicSoft/Mars/mastro/MObservatory.h
r3366 r3497 5 5 #include "MParContainer.h" 6 6 #endif 7 8 class MTime; 7 9 8 10 class MObservatory : public MParContainer … … 56 58 void RotationAngle(Double_t theta, Double_t phi, Double_t &sin, Double_t &cos) const; 57 59 Double_t RotationAngle(Double_t theta, Double_t phi) const; 60 Double_t RotationAngle(Double_t ra, Double_t dec, const MTime &t) const; 58 61 59 62 LocationName_t GetObservatoryKey() const { return fObservatoryKey; }
Note:
See TracChangeset
for help on using the changeset viewer.