Changeset 9156 for trunk/MagicSoft/Mars/mastro
- Timestamp:
- 11/12/08 13:55:31 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mastro
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstro.cc
r8999 r9156 18 18 ! Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 420 ! Copyright: MAGIC Software Development, 2000-2008 21 21 ! 22 22 ! … … 46 46 47 47 ClassImp(MAstro); 48 49 const Double_t MAstro::kSynMonth = 29.53058868; // synodic month (new Moon to new Moon) 50 const Double_t MAstro::kEpoch0 = 44240.37917; // First full moon after 1980/1/1 48 51 49 52 Double_t MAstro::RadToHor() … … 616 619 Double_t MAstro::GetMoonPeriod(Double_t mjd) 617 620 { 618 const Double_t synmonth = 29.53058868; // synodic month (new Moon to new Moon) 619 const Double_t epoch0 = 44240.37917; // First full moon after 1980/1/1 620 621 const Double_t et = mjd-epoch0; // Ellapsed time 622 return et/synmonth; 621 const Double_t et = mjd-kEpoch0; // Elapsed time 622 return et/kSynMonth; 623 } 624 625 // -------------------------------------------------------------------------- 626 // 627 // Convert a moon period back to a mjd 628 // 629 // See also 630 // MAstro::GetMoonPeriod 631 // 632 Double_t MAstro::GetMoonPeriodMjd(Double_t p) 633 { 634 return p*kSynMonth+kEpoch0; 623 635 } 624 636 … … 629 641 // 53257.8 --> 53258 630 642 // 53258.3 --> 53258 631 // Which is the time between 1 3h and 12:59h of the following day. To643 // Which is the time between 12h and 11:59h of the following day. To 632 644 // this day-period we assign the moon-period at midnight. To get 633 645 // the MAGIC definition we now substract 284. … … 653 665 654 666 return (Int_t)TMath::Floor(period)-284; 667 } 668 669 // -------------------------------------------------------------------------- 670 // 671 // Get the start time (12h noon) of the MAGIC period p. 672 // 673 // See also 674 // MAstro::GetMagicPeriod 675 // 676 Double_t MAstro::GetMagicPeriodStart(Int_t p) 677 { 678 return TMath::Floor(GetMoonPeriodMjd(p+284))+0.5; 655 679 } 656 680 -
trunk/MagicSoft/Mars/mastro/MAstro.h
r8907 r9156 16 16 { 17 17 private: 18 static const Double_t kSynMonth; // synodic month (new Moon to new Moon) 19 static const Double_t kEpoch0; // First full moon after 1980/1/1 20 18 21 static Double_t Round(Double_t val); 19 22 static Double_t Trunc(Double_t val); … … 87 90 static Double_t GetMoonPhase(Double_t mjd); 88 91 static Double_t GetMoonPeriod(Double_t mjd); 92 static Double_t GetMoonPeriodMjd(Double_t p); 89 93 static Int_t GetMagicPeriod(Double_t mjd); 94 static Double_t GetMagicPeriodStart(Int_t p); 90 95 91 96 static Double_t EstimateCulminationTime(Double_t mjd, Double_t longit, Double_t ra);
Note:
See TracChangeset
for help on using the changeset viewer.