Changeset 3666 for trunk/MagicSoft/Mars/mpointing
- Timestamp:
- 04/06/04 13:41:56 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mpointing
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpointing/MPointingPos.cc
r3568 r3666 73 73 Double_t MPointingPos::RotationAngle(const MObservatory &o, const MTime &t) const 74 74 { 75 return MAstroSky2Local(t, o).RotationAngle( fRa*TMath::DegToRad()*15, fDec*TMath::DegToRad());75 return MAstroSky2Local(t, o).RotationAngle(GetRaRad(), GetDecRad()); 76 76 } -
trunk/MagicSoft/Mars/mpointing/MPointingPos.h
r3568 r3666 15 15 Double_t fAz; // [deg] Azimuth 16 16 17 Double_t fRa; // [ rad]Right ascension18 Double_t fHa; // [ rad]Hour angle19 Double_t fDec; // [ rad] Declination17 Double_t fRa; // [h] Right ascension 18 Double_t fHa; // [h] Hour angle 19 Double_t fDec; // [deg] Declination 20 20 21 21 public: 22 MPointingPos( )22 MPointingPos(const char *name=0, const char *title=0) 23 23 { 24 fName = "MPointingPos";25 fTitle = "Container storing the (corrected) telescope pointing position";24 fName = name ? name : "MPointingPos"; 25 fTitle = title ? title : "Container storing the (corrected) telescope pointing position"; 26 26 } 27 27 … … 35 35 Double_t GetDec() const { return fDec; } 36 36 37 Double_t GetRaRad() const { return fRa*TMath::DegToRad()*15; } 38 Double_t GetDecRad() const { return fDec*TMath::DegToRad(); } 39 37 40 Double_t RotationAngle(const MObservatory &o) const; 38 41 Double_t RotationAngle(const MObservatory &o, const MTime &t) const; 42 Double_t RotationAngle(const MObservatory &o, const MTime *t) const 43 { 44 return t ? RotationAngle(o, *t) : RotationAngle(o); 45 } 39 46 40 47 ClassDef(MPointingPos, 1) //Container storing the (corrected) telescope pointing position -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc
r3592 r3666 46 46 // To be done: 47 47 // - wobble mode missing 48 // - a switch between using sky-coordinates and time or local-coordinates 49 // from MPointingPos for determin the rotation angle 50 // - the center of rotation need not to be the camera center 48 51 // 49 52 ////////////////////////////////////////////////////////////////////////////// … … 101 104 { 102 105 *fLog << err << "MObservatory not found... aborting." << endl; 106 return kFALSE; 107 } 108 109 fTime = (MTime*)pList->FindObject("MTime"); 110 if (!fTime) 111 { 112 *fLog << err << "MTime not found... aborting." << endl; 103 113 return kFALSE; 104 114 } … … 166 176 return kTRUE; 167 177 178 // rotate the source position by the current rotation angle 179 const Double_t rho = fPointPos->RotationAngle(*fObservatory, *fTime); 180 168 181 // Define source position in the camera plain 169 182 TVector2 v(fX, fY); 170 171 // rotate the source position by the current rotation angle 172 const Double_t rho = fPointPos->RotationAngle(*fObservatory); 173 v=v.Rotate(-rho); 183 v=v.Rotate(rho); 174 184 175 185 // Convert coordinates into camera plain (mm) -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h
r3568 r3666 10 10 class MSrcPosCam; 11 11 class MGeomCam; 12 class MTime; 12 13 13 14 class MSrcPosCalc : public MTask … … 18 19 MSrcPosCam *fSrcPos; 19 20 MGeomCam *fGeom; 21 MTime *fTime; 20 22 21 23 Double_t fR; // Distance of source to a fitted star … … 32 34 MSrcPosCalc(const char *name=NULL, const char *title=NULL); 33 35 36 // Use is deprecated! 34 37 void SetOffset(Double_t r, Double_t drho) 35 38 {
Note:
See TracChangeset
for help on using the changeset viewer.