Changeset 8818
- Timestamp:
- 01/18/08 17:06:02 (17 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/catalog/SlaStars.cc
r4076 r8818 15 15 void SlaStars::Set(const AltAz &altaz) 16 16 { 17 fAltAz = altaz * kDeg2Rad;17 fAltAz = altaz * TMath::DegToRad(); 18 18 fRaDec = CalcRaDec(fAltAz); 19 19 } … … 21 21 void SlaStars::Set(const ZdAz &zdaz) 22 22 { 23 fAltAz = AltAz( kPiDiv2-zdaz.Zd(), zdaz.Az()) * kDeg2Rad;23 fAltAz = AltAz(TMath::Pi()/2-zdaz.Zd(), zdaz.Az()) * TMath::DegToRad(); 24 24 fRaDec = CalcRaDec(fAltAz); 25 25 } … … 27 27 void SlaStars::Set(const RaDec &radec) 28 28 { 29 fRaDec = radec * kDeg2Rad;29 fRaDec = radec * TMath::DegToRad(); 30 30 fAltAz = CalcAltAz(fRaDec); 31 31 } … … 55 55 RaDec SlaStars::CalcRaDec(const AltAz &altaz) const 56 56 { 57 return CalcRaDec(ZdAz( kPiDiv2-altaz.Alt(), altaz.Az()));57 return CalcRaDec(ZdAz(TMath::Pi()/2-altaz.Alt(), altaz.Az())); 58 58 } 59 59 … … 102 102 // Right Ascension/Declination [rad] 103 103 // 104 return CalcRaDecFast(AltAz( kPiDiv2-zdaz.Zd(), zdaz.Az()));104 return CalcRaDecFast(AltAz(TMath::Pi()/2-zdaz.Zd(), zdaz.Az())); 105 105 } 106 106 … … 116 116 // 117 117 AltAz altaz = CalcAltAzFast(radec); 118 return ZdAz( kPiDiv2-altaz.Alt(), altaz.Az());118 return ZdAz(TMath::Pi()/2-altaz.Alt(), altaz.Az()); 119 119 } 120 120 … … 170 170 { 171 171 ZdAz zdaz = CalcZdAz(radec); 172 return AltAz( kPiDiv2-zdaz.Zd(), zdaz.Az());172 return AltAz(TMath::Pi()/2-zdaz.Zd(), zdaz.Az()); 173 173 } 174 174 -
trunk/MagicSoft/Cosy/catalog/Slalib.cc
r8376 r8818 61 61 slaDe2h(ha, dec, GetPhi(), &az, &alt); 62 62 63 return ZdAz( kPiDiv2-alt, az);63 return ZdAz(TMath::Pi()/2-alt, az); 64 64 } -
trunk/MagicSoft/Cosy/catalog/StarCatalog.h
r7764 r8818 56 56 void PaintImg(unsigned char *buf, int w, int h); 57 57 58 const AltAz GetAltAz() const /*[deg]*/ { return fAltAz* kRad2Deg; }59 const ZdAz GetZdAz() const /*[deg]*/ { return ZdAz( kPiDiv2-fAltAz.Alt(), fAltAz.Az())*kRad2Deg; }58 const AltAz GetAltAz() const /*[deg]*/ { return fAltAz*TMath::RadToDeg(); } 59 const ZdAz GetZdAz() const /*[deg]*/ { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az())*kRad2Deg; } 60 60 const RaDec GetRaDec() const /*[deg]*/ { return fRaDec*kRad2Deg; } 61 61 -
trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
r8376 r8818 271 271 void MGSkyPosition::SetDot(TArc *arc, const RaDec &radec, Int_t off) 272 272 { 273 RaDec rd(radec.Ra()+off*360/24* kDeg2Rad, radec.Dec());273 RaDec rd(radec.Ra()+off*360/24*TMath::DegToRad(), radec.Dec()); 274 274 ZdAz zdaz = fSlaStar->CalcZdAzFast(rd); 275 275 … … 294 294 static int Ry=~0; 295 295 296 const float rad = az* kDeg2Rad; // [rad]296 const float rad = az*TMath::DegToRad(); // [rad] 297 297 298 298 const float s = sin(rad); … … 379 379 UpdateStars(); 380 380 381 RaDec radec = fSlaStar->CalcRaDecFast(pos* kDeg2Rad);381 RaDec radec = fSlaStar->CalcRaDecFast(pos*TMath::DegToRad()); 382 382 UpdatePosition(radec, pos.Zd(), pos.Az()); 383 383 UpdateText(pos.Zd(), pos.Az()); -
trunk/MagicSoft/Cosy/main/MCaos.cc
r8376 r8818 2 2 3 3 #include <fstream> 4 #include <iomanip>5 4 6 5 #include <TSystem.h> … … 12 11 #include <TCanvas.h> 13 12 13 #include "MLog.h" 14 #include "MLogManip.h" 15 14 16 #include "MTime.h" 17 #include "MPointing.h" 15 18 16 19 #include "Led.h" … … 19 22 #include "FilterLed.h" 20 23 21 #include "coord.h"22 23 24 using namespace std; 24 25 … … 28 29 if (!fin) 29 30 { 30 cout<< "ERROR - Cannot open " << name << endl;31 gLog << err << "ERROR - Cannot open " << name << endl; 31 32 return; 32 33 } … … 34 35 fPositions.Clear(); 35 36 36 cout<< " Reading " << name << ":" << endl;37 cout<< "------------------------------" << endl;37 gLog << all << " Reading " << name << ":" << endl; 38 gLog << inf << "------------------------------" << endl; 38 39 while (1) 39 40 { … … 43 44 break; 44 45 45 cout<< " Led #" << fPositions.GetEntriesFast() << ": ";46 cout<< setw(3) << px << " ";47 cout<< setw(3) << py << " (";48 cout<< setw(3) << ox << ", ";49 cout<< setw(3) << oy << ")" << endl;46 gLog << " Led #" << fPositions.GetEntriesFast() << ": "; 47 gLog << setw(3) << px << " "; 48 gLog << setw(3) << py << " ("; 49 gLog << setw(3) << ox << ", "; 50 gLog << setw(3) << oy << ")" << endl; 50 51 AddPosition(px, py, ox, oy); 51 52 } 52 cout<< "Found " << fPositions.GetEntriesFast() << " leds." << endl;53 gLog << all << "Found " << fPositions.GetEntriesFast() << " leds." << endl; 53 54 } 54 55 … … 74 75 fFile = NULL; 75 76 76 cout << "Error:Cannot open file '" << name << "'" << endl;77 gLog << err << "ERROR - Cannot open file '" << name << "'" << endl; 77 78 } 78 79 … … 87 88 tree->Branch("EvtTime.", &fEvtTime, "fEvtTime/D"); 88 89 89 cout<< "Root file '" << name << "' open." << endl;90 gLog << inf << "Root file '" << name << "' open." << endl; 90 91 } 91 92 … … 102 103 fFile = NULL; 103 104 104 cout<< "Root file closed (n=" << n << ")" << endl;105 gLog << inf << "Root file closed (n=" << n << ")" << endl; 105 106 106 107 if (n<1) 107 108 { 108 109 gSystem->Unlink(name); 109 cout<< "Root file deleted - no entries." << endl;110 gLog << warn << "Root file deleted - no entries." << endl; 110 111 } 111 112 }
Note:
See TracChangeset
for help on using the changeset viewer.