Changeset 8324 for trunk/MagicSoft/Mars/mastro
- Timestamp:
- 02/16/07 09:21:13 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mastro
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstro.cc
r8066 r8324 446 446 } 447 447 448 // -------------------------------------------------------------------------- 449 // 450 // Estimates the time at which a source culminates. 451 // 452 // ra: right ascension [rad] 453 // elong: observers longitude [rad] 454 // mjd: modified julian date (utc) 455 // 456 // return time in [-12;12] 457 // 458 Double_t MAstro::EstimateCulminationTime(Double_t mjd, Double_t elong, Double_t ra) 459 { 460 // startime at 1.1.2000 for greenwich 0h 461 const Double_t gmt0 = 6.664520; 462 463 // difference of startime for greenwich for two calendar days [h] 464 const Double_t d0 = 0.06570982224; 465 466 // mjd of greenwich 1.1.2000 0h 467 const Double_t mjd0 = 51544; 468 469 // mjd today 470 const Double_t mjd1 = TMath::Floor(mjd); 471 472 // scale between star-time and sun-time 473 const Double_t scale = 1;//1.00273790926; 474 475 const Double_t UT = (ra-elong)*RadToHor() - (gmt0 + d0 * (mjd1-mjd0))/scale; 476 477 return fmod(2412 + UT, 24) - 12; 478 } 448 479 449 480 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mastro/MAstro.h
r8140 r8324 31 31 static Double_t HorToDeg() { return 1./15; } 32 32 33 static Double_t RadToHor() { return 15/TMath::TwoPi(); }34 static Double_t HorToRad() { return TMath::TwoPi()/ 15; }33 static Double_t RadToHor() { return 24/TMath::TwoPi(); } 34 static Double_t HorToRad() { return TMath::TwoPi()/24; } 35 35 36 36 // Angle/Time conversion functions … … 86 86 static Int_t GetMagicPeriod(Double_t mjd); 87 87 88 static Double_t EstimateCulminationTime(Double_t mjd, Double_t longit, Double_t ra); 89 88 90 // Estimate some parameters around the sun 89 91 static Double_t GetSunRaDec(Double_t mjd, Double_t &ra, Double_t &dec); -
trunk/MagicSoft/Mars/mastro/MObservatory.cc
r8066 r8324 110 110 *fLog << all; 111 111 *fLog << underline << fObservatoryName << ":" << endl; 112 *fLog << "Latitude: " << TMath::Abs(fLatitude*kRad2Deg) << " deg " << (fLatitude > 0 ? " W" : "E") << endl;113 *fLog << "Longitude: " << TMath::Abs(fLongitude*kRad2Deg) << " deg " << (fLongitude < 0 ? " N" : "S") << endl;112 *fLog << "Latitude: " << TMath::Abs(fLatitude*kRad2Deg) << " deg " << (fLatitude > 0 ? "N" : "S") << endl; 113 *fLog << "Longitude: " << TMath::Abs(fLongitude*kRad2Deg) << " deg " << (fLongitude < 0 ? "E" : "W") << endl; 114 114 *fLog << "Height: " << fHeight << "m" << endl; 115 115 }
Note:
See TracChangeset
for help on using the changeset viewer.