- Timestamp:
- 12/01/09 13:03:41 (15 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Changelog
r9522 r9523 2 2 2009/12/01 Thomas Bretz 3 3 4 * catalog/SlaStars. h:4 * catalog/SlaStars.[h,cc]: 5 5 - fixed unit of GetZdAz 6 6 - added GetZdAzRad and GetRaDecRad 7 - added some comments 8 - added TT 9 - use TT instead of UTC in slaMappa. This should be more 10 accurate but is not needed according to the documentation 11 (maybe for the moon?) 7 12 8 13 * main/MTracking.cc: … … 17 22 * tcpip/MDriveCom.cc: 18 23 - fixed the number of expected arguments in CELEST command 24 25 * catalog/SlaPlanets.[h,cc]: 26 - moved TT to the base class 27 - commented out the calculation of the earth's heliocentric 28 coordinates which were never used. 29 - removed fDt which was not used either 19 30 20 31 -
trunk/MagicSoft/Cosy/catalog/SlaPlanets.cc
r9516 r9523 9 9 using namespace std; 10 10 11 SlaPlanets::SlaPlanets(MObservatory::LocationName_t key) : SlaStars(key) , fDt(slaDt(2000.0)/60./60./24.)11 SlaPlanets::SlaPlanets(MObservatory::LocationName_t key) : SlaStars(key)//, fDt(slaDt(2000.0)/60./60./24.) 12 12 { 13 13 } … … 17 17 SlaStars::SetMjd(mjd); 18 18 19 fTt = GetMjd() + slaDtt(GetMjd())/60./60./24.;20 21 19 // 22 // coordinates of earth: heliocentric, equatori l, J200020 // coordinates of earth: heliocentric, equatorial, J2000 23 21 // 22 /* 24 23 double veb[3]; // barycentric velocity 25 24 double ceb[3]; // barycentric coordinates … … 27 26 28 27 slaEvp(GetMjd() + fDt, 2000.0, veb, ceb, veh, fEarth); 28 */ 29 29 } 30 30 … … 40 40 // One can use TT instead of TDB for all planets (except the moon?) 41 41 // TDB, planet, elong, phi, *ra, *dec, *diam 42 slaRdplan( fTt, planet, GetElong(), GetPhi(), &ra, &dec, &diam);42 slaRdplan(GetTT(), planet, GetElong(), GetPhi(), &ra, &dec, &diam); 43 43 44 44 return RaDec(ra, dec); -
trunk/MagicSoft/Cosy/catalog/SlaPlanets.h
r9516 r9523 27 27 { 28 28 private: 29 double fDt; // [mjd] const: rootcint/TMemberInspector 30 double fTt; // [mjd] timescale TT 29 //double fDt; // [mjd] The result is a rough estimate of ET-UT (after 1984, TT-UT1) at the given epoch, in seconds 31 30 32 31 ZdAz fZdAz[10]; // [rad] 33 32 34 double fEarth[3]; // heliocentric coordinates33 //double fEarth[3]; // heliocentric coordinates 35 34 36 ZdAz GetMoonPos() const;35 //ZdAz GetMoonPos() const; 37 36 38 37 public: -
trunk/MagicSoft/Cosy/catalog/SlaStars.cc
r9516 r9523 12 12 } 13 13 14 SlaStars::~SlaStars()15 {16 }17 18 14 void SlaStars::Set(const AltAz &altaz) 19 15 { … … 42 38 Slalib::SetMjd(mjd); 43 39 40 fTt = GetMjd() + slaDtt(GetMjd())/60./60./24.; 41 44 42 // 45 43 // ----- calculate star independent parameters ---------- … … 47 45 48 46 // prepare calculation: Mean Place to geocentric apperent 49 slaMappa(2000.0, GetMjd(), fAmprms); // Epoche, TDB 47 // (UTC would also do, except for the moon?) 48 slaMappa(2000.0, fTt, fAmprms); // Epoche, TDB 50 49 51 50 // prepare: Apperent to observed place … … 54 53 0, 0, // polar motion x, y-coordinate (radians) 55 54 // 273.155, 1013.25, 0.5, // temp, pressure, humidity 56 273.155+10, 780.0, 0.25, // temp, pressure, humidity55 273.155+10, 780.0, 0.25, // temp, pressure, humidity 57 56 // 0.2, 0.0065, // wavelength, tropo lapse rate 58 57 0.55, 0.0065, // wavelength, tropo lapse rate 59 58 fAoprms); 59 60 // Delta UT should be less than 0.9s which is its definition 61 // so we can fairly assume it to be neglegible 60 62 } 61 63 -
trunk/MagicSoft/Cosy/catalog/SlaStars.h
r9522 r9523 21 21 double fAoprms[14]; 22 22 23 double fTt; // [mjd] timescale TT 24 23 25 public: 24 26 SlaStars(MObservatory::LocationName_t key); 25 virtual ~SlaStars() ;27 virtual ~SlaStars() { } 26 28 27 29 // const AltAz GetAltAz() const { return fAltAz*360/D2PI; } … … 31 33 const RaDec GetRaDecRad() const { return fRaDec; } 32 34 const double GetHourAngle() const { return fHourAngle; } 35 36 const double GetTT() const { return fTt; } 33 37 34 38 virtual void SetMjd(double mjd); -
trunk/MagicSoft/Cosy/main/MTracking.cc
r9522 r9523 225 225 // if (fCosy->fStarguider) 226 226 // fCosy->fStarguider->SetPointingPosition(sla.GetRaDec()); 227 228 // gLog << all << "=====> " << (int)(&sla==&fSlalib) << " " << fTrackType << " MJD=" << Form("%.13f", sla.GetMjd()) << " HA=" << sla.GetHourAngle() << " Alpha=" << sla.GetAlpha() << " fTrackPos.Ra()=" << fTrackPos.Ra() << " fTrackPos.Dec()=" << fTrackPos.Dec() << " Alt=" << sla.GetZdAzRad().Zd() << " Az=" << sla.GetZdAzRad().Az() << endl; 229 } 230 231 void MTracking::UpdateSlalib(Double_t dt=0) 227 } 228 229 void MTracking::UpdateSlalib(Double_t dt) 232 230 { 233 231 fSlalib.Now(dt); … … 248 246 const RaDec &dst = fSlalib.GetRaDecRad(); 249 247 250 ZdAz dest = fSlalib.GetZdAzRad(); //fSlalib.CalcZdAz(dst);251 252 if (fTrackType <0)253 gLog << all << fSlalib.GetTime() << ": Tracking Planet "<< endl;248 ZdAz dest = fSlalib.GetZdAzRad(); 249 250 if (fTrackType>=0) 251 gLog << all << fSlalib.GetTime() << ": Tracking Planet with Id " << fTrackType << endl; 254 252 gLog << all << fSlalib.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl; 255 253 … … 279 277 void MTracking::TrackPosition(const RaDec &dst) 280 278 { 281 282 // gLog << all << "=====> dst.Ra()=" << dst.Ra() << " dst.Dec()=" << dst.Dec() << " (deg?)" << endl;283 284 279 fTrackPos = dst; 285 280 fTrackType = -1; … … 322 317 // Get current nominal local position 323 318 UpdateSlalib(); 324 //fCosy->fRaDec = fSlalib.GetRaDec(); 325 326 ZdAz pos = fSlalib.GetZdAzRad();//fSlalib.CalcZdAz(fSlalib.GetRaDec()); 319 320 ZdAz pos = fSlalib.GetZdAzRad(); 327 321 328 322 // Some output … … 363 357 // 364 358 UpdateSlalib(dt); 365 //fCosy->fRaDec = fSlalib.GetRaDec();366 359 367 360 // 368 361 // Request nominal position for this time in the future (To+dt) 369 362 // 370 const ZdAz pointing = fSlalib.GetZdAzRad(); //fSlalib.CalcZdAz(fSlalib.GetRaDec()); // [rad]363 const ZdAz pointing = fSlalib.GetZdAzRad(); 371 364 ZdAz dest = fCosy->AlignTrackingPos(pointing); // fix ambiguity 372 365 … … 461 454 //SlaPlanets sla(fSlalib.GetObservatoryKey()); 462 455 SlaPlanets sla(MObservatory::kMagic1); 463 // gLog << all << "====> KEYS " << (int)fSlalib.GetObservatoryKey() << " " << (int)sla.GetObservatoryKey() << " " << (int)fCosy->fObservatory << endl;464 456 465 457 UpdateSlalib(sla); 466 467 //ZdAz soll = sla.GetZdAz(); //sla.CalcZdAz(sla.GetRaDec()); // [rad]468 458 469 459 // … … 507 497 UpdateSlalib(sla, mjdzd); 508 498 509 ZdAz dummy = sla.GetZdAzRad(); //sla.CalcZdAz(radec, mjdzd);499 ZdAz dummy = sla.GetZdAzRad(); 510 500 dummy = fCosy->AlignTrackingPos(dummy); 511 501 fCosy->fZdAzSoll.Zd(dummy.Zd()); … … 518 508 UpdateSlalib(sla, mjdaz); 519 509 520 ZdAz dummy = sla.GetZdAzRad(); //sla.CalcZdAz(radec, mjdaz);510 ZdAz dummy = sla.GetZdAzRad(); 521 511 dummy = fCosy->AlignTrackingPos(dummy); 522 512 fCosy->fZdAzSoll.Az(dummy.Az()); -
trunk/MagicSoft/Cosy/main/MTracking.h
r9516 r9523 31 31 32 32 void UpdateSlalib(SlaPlanets &sla); 33 void UpdateSlalib(Double_t dt );33 void UpdateSlalib(Double_t dt=0); 34 34 void UpdateSlalib(SlaPlanets &sla, Double_t mjd); 35 35
Note:
See TracChangeset
for help on using the changeset viewer.