Changeset 3568 for trunk/MagicSoft/Mars/mastro/MAstroSky2Local.cc
- Timestamp:
- 03/22/04 09:25:49 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstroSky2Local.cc
r3537 r3568 62 62 #include "MAstroSky2Local.h" 63 63 64 #include "MAstro.h" 64 65 #include "MTime.h" 65 66 #include "MObservatory.h" … … 128 129 // seen with an Alt/Az telescope. 129 130 // 131 // For more information see MAstro::RotationAngle 132 // 130 133 Double_t MAstroSky2Local::RotationAngle(Double_t ra, Double_t dec) const 131 134 { 132 TVector3 loc;133 loc.SetMagThetaPhi(1, TMath::Pi()/2-dec, ra);134 loc*= *this;135 TVector3 v; 136 v.SetMagThetaPhi(1, TMath::Pi()/2-dec, ra); 137 v *= *this; 135 138 136 TRotation rot; 137 rot.RotateZ(-loc.Phi()); 138 rot.RotateY(-loc.Theta()); 139 140 TVector3 v(1, 0, 0); 141 v *= *this; 142 v *= rot; 143 144 return TMath::ATan2(v(1), v(0)); 139 return MAstro::RotationAngle(ZZ(), XZ(), v.Theta(), v.Phi()); 145 140 }
Note:
See TracChangeset
for help on using the changeset viewer.