Changeset 1953 for trunk/MagicSoft/Cosy/catalog
- Timestamp:
- 04/12/03 19:06:27 (22 years ago)
- Location:
- trunk/MagicSoft/Cosy/catalog
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/catalog/SlaStars.h
r1758 r1953 40 40 ZdAz CalcZdAz (const RaDec &radec) const; 41 41 42 AltAz CalcAltAz(const RaDec &radec, double mjd) 43 { SetMjd(mjd); return CalcAltAz(radec); } 44 ZdAz CalcZdAz (const RaDec &radec, double mjd) 45 { SetMjd(mjd); return CalcZdAz(radec); } 46 42 47 AltAz CalcAltAzFast(const RaDec &radec) const; 43 48 ZdAz CalcZdAzFast (const RaDec &radec) const; -
trunk/MagicSoft/Cosy/catalog/StarCatalog.cc
r1803 r1953 14 14 ClassImp(StarCatalog); 15 15 16 StarCatalog::StarCatalog(MObservatory::LocationName_t key) : SlaStars(key), fEntries(0) 16 StarCatalog::StarCatalog(MObservatory::LocationName_t key) : SlaStars(key), fEntries(0), fSinAngle(0), fCosAngle(1) 17 17 { 18 18 // p = pointer to MainFrame (not owner) … … 505 505 // Align alt/az[pix] 506 506 // 507 const int xx = 767-(int)((fWidth-dx+DPI)/fPixSize); 508 const int yy = (int)((fHeight+dy)/fPixSize); 507 const int xx = (int)(((dx-DPI)*fCosAngle - dy*fSinAngle + fWidth)/fPixSize); 508 const int yy = (int)(((dx-DPI)*fSinAngle + dy*fCosAngle + fHeight)/fPixSize); 509 //const int xx = 767-(int)((fWidth-dx+DPI)/fPixSize); 510 //const int yy = (int)((fHeight+dy)/fPixSize); 509 511 510 512 // … … 685 687 686 688 // 687 // Align a lt/az[pix]688 // 689 const float xx = 768.0 - (fWidth -dx+DPI)/fPixSize;690 const float yy = (fHeight+dy)/fPixSize;689 // Align and rotate alt/az[pix] 690 // 691 float xx = ((dx-DPI)*fCosAngle - dy*fSinAngle + fWidth)/fPixSize; 692 float yy = ((dx-DPI)*fSinAngle + dy*fCosAngle + fHeight)/fPixSize; 691 693 692 694 // … … 710 712 AltAz StarCatalog::CalcAltAzFromPix(Double_t pixx, Double_t pixy) const 711 713 { 712 Double_t dx = (pixx-768.0)*fPixSize + fWidth+DPI; 713 Double_t dy = pixy*fPixSize - fHeight; 714 pixx *= fPixSize; 715 pixy *= fPixSize; 716 717 const double dx = (pixx-fWidth)*fCosAngle + (pixy-fHeight)*fSinAngle; 718 const double dy = -(pixx-fWidth)*fSinAngle + (pixy-fHeight)*fCosAngle; 719 720 //const double dx = (pixx-768.0)*fPixSize + fWidth+DPI; 721 //const double dy = pixy*fPixSize - fHeight; 714 722 715 723 double ha, dec; -
trunk/MagicSoft/Cosy/catalog/StarCatalog.h
r1803 r1953 28 28 double fWidth; // size of display 29 29 double fHeight; // 30 double fSinAngle; 31 double fCosAngle; 30 32 31 33 float fLimitMag; // [M] limiting magnitude for display … … 87 89 void SetPixSize(const double pixsize); 88 90 void SetLimitMag(const float mag) { fLimitMag = mag; } 91 void SetRotationAngle(const float angle) { fSinAngle = sin(angle/kRad2Deg); fCosAngle = cos(angle/kRad2Deg); } 89 92 90 93 double GetPixSize() const;
Note:
See TracChangeset
for help on using the changeset viewer.