Changeset 10008 for trunk/Cosy/main
- Timestamp:
- 10/14/10 13:47:48 (14 years ago)
- Location:
- trunk/Cosy/main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosy/main/MMoonPointing.cc
r9884 r10008 22 22 public: 23 23 MPositionOffsetCalc(Double_t offset) : 24 fCosOffset(offset==0 ? 0 : TMath::Cos(offset *TMath::DegToRad())),25 fSinOffset(offset==0 ? 0 : TMath::Sin(offset *TMath::DegToRad())),24 fCosOffset(offset==0 ? 0 : TMath::Cos(offset)), 25 fSinOffset(offset==0 ? 0 : TMath::Sin(offset)), 26 26 fCosAngle(0), fSinAngle(0) 27 27 { … … 29 29 30 30 MPositionOffsetCalc(Double_t offset, Double_t angle) : 31 fCosOffset(offset==0 ? 0 : TMath::Cos(offset *TMath::DegToRad())),32 fSinOffset(offset==0 ? 0 : TMath::Sin(offset *TMath::DegToRad())),31 fCosOffset(offset==0 ? 0 : TMath::Cos(offset)), 32 fSinOffset(offset==0 ? 0 : TMath::Sin(offset)), 33 33 fCosAngle(TMath::Cos(angle*TMath::DegToRad())), 34 34 fSinAngle(TMath::Sin(angle*TMath::DegToRad())) … … 37 37 38 38 MPositionOffsetCalc(Double_t offset, Double_t cos, Double_t sin) : 39 fCosOffset(offset==0 ? 0 : TMath::Cos(offset *TMath::DegToRad())),40 fSinOffset(offset==0 ? 0 : TMath::Sin(offset *TMath::DegToRad())),39 fCosOffset(offset==0 ? 0 : TMath::Cos(offset)), 40 fSinOffset(offset==0 ? 0 : TMath::Sin(offset)), 41 41 fCosAngle(cos), fSinAngle(sin) 42 42 { … … 133 133 Bool_t MMoonPointing::CalcPosition(const ZdAz &moon, ZdAz &srcpos, ZdAz &pointpos) const 134 134 { 135 const Double_t fcos = const_cast<TGraph2D&>(fCos).Interpolate(moon.Az(), moon.Zd()); 136 const Double_t fsin = const_cast<TGraph2D&>(fSin).Interpolate(moon.Az(), moon.Zd()); 135 const Double_t az = fmod(moon.Az()+TMath::TwoPi(), TMath::TwoPi()); 136 137 const Double_t fcos = const_cast<TGraph2D&>(fCos).Interpolate(az, moon.Zd()); 138 const Double_t fsin = const_cast<TGraph2D&>(fSin).Interpolate(az, moon.Zd()); 137 139 138 140 // This is a sanity check for the case the Interpolation failed -
trunk/Cosy/main/MSlewing.cc
r9132 r10008 134 134 const ZdAz dest = bend/TMath::TwoPi(); // [revolutions] 135 135 136 // Check whether bending is valid! 137 136 138 if (!fCosy->CheckRange(bend)) 137 139 return kFALSE;
Note:
See TracChangeset
for help on using the changeset viewer.