Changeset 9523


Ignore:
Timestamp:
12/01/09 13:03:41 (13 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Changelog

    r9522 r9523  
    22 2009/12/01 Thomas Bretz
    33
    4    * catalog/SlaStars.h:
     4   * catalog/SlaStars.[h,cc]:
    55     - fixed unit of GetZdAz
    66     - 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?)
    712
    813   * main/MTracking.cc:
     
    1722   * tcpip/MDriveCom.cc:
    1823     - 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
    1930
    2031
  • trunk/MagicSoft/Cosy/catalog/SlaPlanets.cc

    r9516 r9523  
    99using namespace std;
    1010
    11 SlaPlanets::SlaPlanets(MObservatory::LocationName_t key) : SlaStars(key), fDt(slaDt(2000.0)/60./60./24.)
     11SlaPlanets::SlaPlanets(MObservatory::LocationName_t key) : SlaStars(key)//, fDt(slaDt(2000.0)/60./60./24.)
    1212{
    1313}
     
    1717    SlaStars::SetMjd(mjd);
    1818
    19     fTt = GetMjd() + slaDtt(GetMjd())/60./60./24.;
    20 
    2119    //
    22     // coordinates of earth: heliocentric, equatoril, J2000
     20    // coordinates of earth: heliocentric, equatorial, J2000
    2321    //
     22    /*
    2423    double veb[3]; // barycentric velocity
    2524    double ceb[3]; // barycentric coordinates
     
    2726
    2827    slaEvp(GetMjd() + fDt, 2000.0, veb, ceb, veh, fEarth);
     28    */
    2929}
    3030
     
    4040    // One can use TT instead of TDB for all planets (except the moon?)
    4141    // 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);
    4343
    4444    return RaDec(ra, dec);
  • trunk/MagicSoft/Cosy/catalog/SlaPlanets.h

    r9516 r9523  
    2727{
    2828private:
    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
    3130
    3231    ZdAz fZdAz[10];    // [rad]
    3332
    34     double fEarth[3];  // heliocentric coordinates
     33    //double fEarth[3];  // heliocentric coordinates
    3534
    36     ZdAz   GetMoonPos() const;
     35    //ZdAz   GetMoonPos() const;
    3736
    3837public:
  • trunk/MagicSoft/Cosy/catalog/SlaStars.cc

    r9516 r9523  
    1212}
    1313
    14 SlaStars::~SlaStars()
    15 {
    16 }
    17 
    1814void SlaStars::Set(const AltAz &altaz)
    1915{
     
    4238    Slalib::SetMjd(mjd);
    4339
     40    fTt = GetMjd() + slaDtt(GetMjd())/60./60./24.;
     41
    4442    //
    4543    // ----- calculate star independent parameters ----------
     
    4745
    4846    // 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
    5049
    5150    // prepare: Apperent to observed place
     
    5453             0, 0,                         // polar motion x, y-coordinate (radians)
    5554             // 273.155, 1013.25, 0.5,     // temp, pressure, humidity
    56              273.155+10, 780.0, 0.25,     // temp, pressure, humidity
     55             273.155+10, 780.0, 0.25,      // temp, pressure, humidity
    5756             // 0.2, 0.0065,               // wavelength, tropo lapse rate
    5857             0.55, 0.0065,                 // wavelength, tropo lapse rate
    5958             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
    6062}
    6163
  • trunk/MagicSoft/Cosy/catalog/SlaStars.h

    r9522 r9523  
    2121    double   fAoprms[14];
    2222
     23    double   fTt;        // [mjd] timescale TT
     24
    2325public:
    2426    SlaStars(MObservatory::LocationName_t key);
    25     virtual ~SlaStars();
     27    virtual ~SlaStars() { }
    2628
    2729    //    const AltAz GetAltAz() const { return fAltAz*360/D2PI; }
     
    3133    const RaDec  GetRaDecRad() const  { return fRaDec; }
    3234    const double GetHourAngle() const { return fHourAngle; }
     35
     36    const double GetTT() const        { return fTt; }
    3337
    3438    virtual void SetMjd(double mjd);
  • trunk/MagicSoft/Cosy/main/MTracking.cc

    r9522 r9523  
    225225//    if (fCosy->fStarguider)
    226226//        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
     229void MTracking::UpdateSlalib(Double_t dt)
    232230{
    233231    fSlalib.Now(dt);
     
    248246    const RaDec &dst = fSlalib.GetRaDecRad();
    249247
    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;
    254252    gLog << all << fSlalib.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl;
    255253
     
    279277void MTracking::TrackPosition(const RaDec &dst)
    280278{
    281 
    282 //    gLog << all << "=====> dst.Ra()=" << dst.Ra() << " dst.Dec()=" << dst.Dec() << "   (deg?)" << endl;
    283 
    284279    fTrackPos  = dst;
    285280    fTrackType = -1;
     
    322317    // Get current nominal local position
    323318    UpdateSlalib();
    324     //fCosy->fRaDec = fSlalib.GetRaDec();
    325 
    326     ZdAz pos = fSlalib.GetZdAzRad();//fSlalib.CalcZdAz(fSlalib.GetRaDec());
     319
     320    ZdAz pos = fSlalib.GetZdAzRad();
    327321
    328322    // Some output
     
    363357        //
    364358        UpdateSlalib(dt);
    365         //fCosy->fRaDec = fSlalib.GetRaDec();
    366359
    367360        //
    368361        // Request nominal position for this time in the future (To+dt)
    369362        //
    370         const ZdAz pointing = fSlalib.GetZdAzRad(); //fSlalib.CalcZdAz(fSlalib.GetRaDec()); // [rad]
     363        const ZdAz pointing = fSlalib.GetZdAzRad();
    371364        ZdAz dest = fCosy->AlignTrackingPos(pointing);     // fix ambiguity
    372365
     
    461454    //SlaPlanets sla(fSlalib.GetObservatoryKey());
    462455    SlaPlanets sla(MObservatory::kMagic1);
    463 //    gLog << all << "====> KEYS " << (int)fSlalib.GetObservatoryKey() << " " << (int)sla.GetObservatoryKey() << " " << (int)fCosy->fObservatory << endl;
    464456
    465457    UpdateSlalib(sla);
    466 
    467     //ZdAz soll = sla.GetZdAz(); //sla.CalcZdAz(sla.GetRaDec()); // [rad]
    468458
    469459    //
     
    507497            UpdateSlalib(sla, mjdzd);
    508498
    509             ZdAz dummy = sla.GetZdAzRad();//sla.CalcZdAz(radec, mjdzd);
     499            ZdAz dummy = sla.GetZdAzRad();
    510500            dummy = fCosy->AlignTrackingPos(dummy);
    511501            fCosy->fZdAzSoll.Zd(dummy.Zd());
     
    518508            UpdateSlalib(sla, mjdaz);
    519509
    520             ZdAz dummy = sla.GetZdAzRad();//sla.CalcZdAz(radec, mjdaz);
     510            ZdAz dummy = sla.GetZdAzRad();
    521511            dummy = fCosy->AlignTrackingPos(dummy);
    522512            fCosy->fZdAzSoll.Az(dummy.Az());
  • trunk/MagicSoft/Cosy/main/MTracking.h

    r9516 r9523  
    3131
    3232    void UpdateSlalib(SlaPlanets &sla);
    33     void UpdateSlalib(Double_t dt);
     33    void UpdateSlalib(Double_t dt=0);
    3434    void UpdateSlalib(SlaPlanets &sla, Double_t mjd);
    3535
Note: See TracChangeset for help on using the changeset viewer.