Changeset 14851 for trunk/Mars/mastro
- Timestamp:
- 02/04/13 09:53:50 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mastro/MAstro.cc
r9578 r14851 919 919 // All values given in deg, the return value, too. 920 920 // 921 Double_t MAstro::GetDevAbs(Double_t nomzd, Double_t devzd, Double_t devaz) 922 { 923 const Double_t pzd = nomzd * TMath::DegToRad(); 924 const Double_t azd = devzd * TMath::DegToRad(); 925 const Double_t aaz = devaz * TMath::DegToRad(); 926 927 const double el = TMath::Pi()/2-pzd; 928 929 const double dphi2 = aaz/2.; 930 const double cos2 = TMath::Cos(dphi2)*TMath::Cos(dphi2); 931 const double sin2 = TMath::Sin(dphi2)*TMath::Sin(dphi2); 932 const double d = TMath::Cos(azd)*cos2 - TMath::Cos(2*el)*sin2; 933 934 return TMath::ACos(d)*TMath::RadToDeg(); 921 Double_t MAstro::GetDevAbs(Double_t nomzd, Double_t meszd, Double_t devaz) 922 { 923 nomzd *= TMath::DegToRad(); 924 meszd *= TMath::DegToRad(); 925 devaz *= TMath::DegToRad(); 926 927 const double x = sin(meszd) * sin(nomzd) * cos(dvaz); 928 const double y = cos(meszd) * cos(nomzd); 929 930 return acos(x + y) * TMath::RadToDeg(); 935 931 } 936 932
Note:
See TracChangeset
for help on using the changeset viewer.