Changeset 1758 for trunk/MagicSoft/Cosy/catalog
- Timestamp:
- 02/14/03 23:18:37 (22 years ago)
- Location:
- trunk/MagicSoft/Cosy/catalog
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/catalog/SlaPlanets.cc
r1757 r1758 7 7 ClassImp(SlaPlanets); 8 8 9 SlaPlanets::SlaPlanets( ) : Slalib(), fDt(slaDt(2000.0)/60./60./24.)9 SlaPlanets::SlaPlanets(MObservatory::LocationName_t key) : Slalib(key), fDt(slaDt(2000.0)/60./60./24.) 10 10 { 11 11 } … … 15 15 } 16 16 17 void SlaPlanets::SetMjd( constdouble mjd)17 void SlaPlanets::SetMjd(double mjd) 18 18 { 19 19 Slalib::SetMjd(mjd); 20 21 fTt = mjd + slaDtt(mjd)/60./60./24.; 20 22 21 23 // … … 29 31 } 30 32 31 #include "SlaStars.h"32 33 33 void SlaPlanets::UpdatePlanetPos(ePlanets_t planet) 34 34 { 35 /*36 double cp[6] = { 0, 0, 0, 0, 0, 0 };37 38 double coord[6];39 40 switch (planet)41 {42 case kEMoon:43 //44 // -- approximate geocentric pos and vel --45 //46 slaDmoon(GetMjd() + fDt, coord);47 break;48 49 case kEMercury:50 case kEVenus:51 case kEMars:52 case kEJupiter:53 case kESaturn:54 case kEUranus:55 case kENeptune:56 case kEPluto:57 case kESun:58 {59 */60 35 // 61 // coordinates of planet: heliocentric, equatoril, J200036 // coordinates of planet: topocentric, equatorial, J2000 62 37 // 63 double ra,dec,diam; 64 // TDB, planet, elong, phi, *ra, *dec, *diam 38 double ra, dec, diam; 65 39 66 40 // One can use TT instead of TDB for all plenets 67 41 // (except the moon) 68 69 const double tt = GetMjd() + slaDtt(GetMjd())/60./60./24.; 70 71 // FIXME: Shell be UT1 72 const double ut1 = fmod(GetMjd(), 1); 73 74 // tt should be tdb, but tt can be used 75 const double tdb = tt + slaRcc(tt, ut1, GetElong(), 8300*cos(GetPhi()), 8300*sin(GetPhi() ))/60./60./24.; 76 /* 77 cout << "Dt: " << slaDtt(GetMjd()) << endl; 78 cout << "Rc: " << slaRcc(tt, ut1, GetElong(), 8300*cos(GetPhi()), 8300*sin(GetPhi() )) << endl; 79 */ 80 slaRdplan(tt, planet, GetElong(), GetPhi(), 81 &ra, &dec, &diam); 82 /* 83 switch (planet) 84 { 85 case kEMoon: cout << "Moon: "; break; 86 case kEMercury: cout << "Merkur: "; break; 87 case kEVenus: cout << "Venus: "; break; 88 case kEMars: cout << "Mars: "; break; 89 case kEJupiter: cout << "Jupiter: "; break; 90 case kESaturn: cout << "Saturn: "; break; 91 case kEUranus: cout << "Uranus: "; break; 92 case kENeptune: cout << "Neptun: "; break; 93 case kEPluto: cout << "Pluto: "; break; 94 case kESun: cout << "Sonne: "; break; 95 } 96 97 cout << (int)(ra*12/TMath::Pi()) << "h"<< (int)(ra*12/TMath::Pi()*60)%60 <<"min "; 98 cout << (int)(dec*kRad2Deg) << "deg" << (int)(dec*kRad2Deg*60)%60 << "min" << endl; 99 */ 100 /* 101 SlaStars sla; 102 sla.SetMjd(GetMjd()); 103 ZdAz za = sla.CalcZdAz(RaDec(ra,dec)); 104 cout << za.Zd()*kRad2Deg << " " << fmod(za.Az()*kRad2Deg+720,360.) << endl; 105 fZdAz[planet] = za; 106 */ 42 // TDB, planet, elong, phi, *ra, *dec, *diam 43 slaRdplan(fTt, planet, GetElong(), GetPhi(), &ra, &dec, &diam); 107 44 108 45 double az, el; 109 46 slaDe2h(GetAlpha()-ra, dec, GetPhi(), &az, &el); 110 47 111 cout << 90-el*kRad2Deg << " " << fmod(az*kRad2Deg+720,360.) << endl;112 48 fZdAz[planet].Set(TMath::Pi()/2-el, az); 113 /*114 }115 // !! Fall through!116 break;117 case kESun:118 coord[0] = cp[0] - fEarth[0];119 coord[1] = cp[1] - fEarth[1];120 coord[2] = cp[2] - fEarth[2];121 break;122 }123 fZdAz[planet] = XYZ2ZdAz(coord);124 125 if (planet==kESun)126 {127 cout << fZdAz[kESun].Zd()*kRad2Deg << " " << fZdAz[kESun].Az()*kRad2Deg << endl;128 }*/129 49 } -
trunk/MagicSoft/Cosy/catalog/SlaPlanets.h
r1109 r1758 23 23 { 24 24 private: 25 double fDt; // const: rootcint/TMemberInspector 25 double fDt; // [mjd] const: rootcint/TMemberInspector 26 double fTt; // [mjd] timescale TT 26 27 27 28 ZdAz fZdAz[10]; // [rad] … … 32 33 33 34 public: 34 SlaPlanets( );35 SlaPlanets(MObservatory::LocationName_t key); 35 36 virtual ~SlaPlanets(); 36 37 37 // const AltAz GetAltAz() const { return fAltAz*360/D2PI; } 38 // const ZdAz GetZdAz() const { return ZdAz(DPI/2-fAltAz.Alt(), fAltAz.Az())*360/D2PI; } 39 // const RaDec GetRaDec() const { return fRaDec*360/D2PI; } 40 41 void SetMjd(const double mjd); 38 void SetMjd(double mjd); 42 39 43 40 void UpdatePlanetPos(ePlanets_t planet); -
trunk/MagicSoft/Cosy/catalog/SlaStars.cc
r1757 r1758 5 5 ClassImp(SlaStars); 6 6 7 SlaStars::SlaStars( ) : Slalib()7 SlaStars::SlaStars(MObservatory::LocationName_t key) : Slalib(key) 8 8 { 9 9 } -
trunk/MagicSoft/Cosy/catalog/SlaStars.h
r1274 r1758 16 16 17 17 public: 18 SlaStars( );18 SlaStars(MObservatory::LocationName_t key); 19 19 virtual ~SlaStars(); 20 20 -
trunk/MagicSoft/Cosy/catalog/Slalib.cc
r1757 r1758 10 10 ClassImp(Slalib); 11 11 12 Slalib::Slalib( ) : Timer()12 Slalib::Slalib(MObservatory::LocationName_t key) : Timer(), MObservatory(key) 13 13 { 14 // p = pointer to MainFrame (not owner)15 16 //17 // calculate observers location (goe)18 //19 int status;20 //slaDaf2r(51, 38, 48.0, &fPhi, &status);21 //slaDaf2r( 9, 56, 36.0, &fElong, &status);22 //fHeight = 300;23 24 slaDaf2r(28, 45, 30.0, &fPhi, &status);25 slaDaf2r(17, 52, 48.0, &fElong, &status);26 27 fElong *= -1;28 fHeight = 2326;29 30 cout << "Latitude: 51\x9c 38'48.0\" = " << kRad2Deg*fPhi << " ";31 cout << "Longitude: 9\x9c 56'36.0\" = " << kRad2Deg*fElong << endl;32 14 } 33 15 … … 36 18 } 37 19 38 void Slalib::SetMjd( constdouble mjd)20 void Slalib::SetMjd(double mjd) 39 21 { 40 fMjd = mjd;41 fAlpha = slaGmst( fMjd) + fElong;22 Timer::SetMjd(mjd); 23 fAlpha = slaGmst(mjd) + GetElong(); 42 24 } 43 44 void Slalib::SetMjd2Now()45 {46 Now();47 SetMjd(CalcMjd());48 // cout << "GetMjd: "<< (*this)() << " " << GetMjd() << endl;49 }50 51 void Slalib::SetMjd(const struct timeval *tm)52 {53 SetTimer(tm);54 SetMjd(CalcMjd());55 }56 57 25 58 26 ZdAz Slalib::XYZ2ZdAz(double coord[3]) const … … 73 41 // 74 42 double alt, az; 75 slaDe2h(ha, dec, fPhi, &az, &alt);43 slaDe2h(ha, dec, GetPhi(), &az, &alt); 76 44 77 45 return ZdAz(kPiDiv2-alt, az); -
trunk/MagicSoft/Cosy/catalog/Slalib.h
r1757 r1758 5 5 6 6 #include "coord.h" 7 #include "base/timer.h" 7 #include "timer.h" 8 #include "MObservatory.h" 8 9 9 class Slalib : public Timer 10 class Slalib : public Timer, public MObservatory 10 11 { 11 12 private: 12 double fAlpha; 13 double fMjd; 14 15 double fPhi; // location of observatory 16 double fElong; 17 18 double fHeight; 13 double fAlpha; 19 14 20 15 public: 21 Slalib( );16 Slalib(MObservatory::LocationName_t key); 22 17 virtual ~Slalib(); 23 18 24 // const AltAz GetAltAz() const { return fAltAz*360/D2PI; } 25 // const ZdAz GetZdAz() const { return ZdAz(DPI/2-fAltAz.Alt(), fAltAz.Az())*360/D2PI; } 26 // const RaDec GetRaDec() const { return fRaDec*360/D2PI; } 27 28 void SetMjd2Now(); 29 void SetMjd(const struct timeval *tm); 30 31 virtual void SetMjd(const double mjd); 19 virtual void SetMjd(double mjd); 32 20 33 21 double GetAlpha() const { return fAlpha; } 34 double GetMjd() const { return fMjd; }35 36 double GetPhi() const { return fPhi; }37 double GetElong() const { return fElong; }38 39 double GetHeight() const { return fHeight; }40 22 41 23 ZdAz XYZ2ZdAz(double coord[3]) const; -
trunk/MagicSoft/Cosy/catalog/StarCatalog.cc
r1531 r1758 14 14 ClassImp(StarCatalog); 15 15 16 StarCatalog::StarCatalog( ) : SlaStars(), fEntries(0)16 StarCatalog::StarCatalog(MObservatory::LocationName_t key) : SlaStars(key), fEntries(0) 17 17 { 18 18 // p = pointer to MainFrame (not owner) -
trunk/MagicSoft/Cosy/catalog/StarCatalog.h
r1531 r1758 71 71 72 72 public: 73 StarCatalog( );73 StarCatalog(MObservatory::LocationName_t key); 74 74 virtual ~StarCatalog(); 75 75
Note:
See TracChangeset
for help on using the changeset viewer.