Changeset 3497 for trunk/MagicSoft/Mars/mastro/MObservatory.cc
- Timestamp:
- 03/15/04 12:04:09 (21 years ago)
- File:
-
- 1 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 }
Note:
See TracChangeset
for help on using the changeset viewer.