Changeset 9522 for trunk


Ignore:
Timestamp:
12/01/09 10:57:14 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Changelog

    r9517 r9522  
    11                                                                  -*-*- END -*-*-
     2 2009/12/01 Thomas Bretz
     3
     4   * catalog/SlaStars.h:
     5     - fixed unit of GetZdAz
     6     - added GetZdAzRad and GetRaDecRad
     7
     8   * main/MTracking.cc:
     9     - fixed unit of fTrackPos calling sla.Set
     10     - don't distribute ra/dec to starguider it seems to be responsible
     11       for crashes
     12     - fixed units of getting coordinates from slalib
     13     - keep calculating a future position in the tracking loop
     14     - for the moment set the observatory key explicitly
     15       (Mars doesn't store it)
     16
     17   * tcpip/MDriveCom.cc:
     18     - fixed the number of expected arguments in CELEST command
     19
     20
     21
    222 2009/10/21 Thomas Bretz
    323
    424   * catalog/SlaPlanets.[h,cc]:
    525     - Now derives from SlaStars
    6      - new function to get the current sky position of a celestial object
     26     - new function to get the current sky position of a celestial
     27       object
    728
    829   * catalog/SlaStars.[h,cc]:
  • trunk/MagicSoft/Cosy/catalog/SlaStars.h

    r9516 r9522  
    2626
    2727    //    const AltAz GetAltAz() const { return fAltAz*360/D2PI; }
    28     const ZdAz   GetZdAz()  const     { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az())*TMath::DegToRad(); }
     28    const ZdAz   GetZdAz()  const     { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az())/TMath::DegToRad(); }
     29    const ZdAz   GetZdAzRad() const   { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az()); }
    2930    const RaDec  GetRaDec() const     { return fRaDec/TMath::DegToRad(); }
     31    const RaDec  GetRaDecRad() const  { return fRaDec; }
    3032    const double GetHourAngle() const { return fHourAngle; }
    3133
  • trunk/MagicSoft/Cosy/main/MTracking.cc

    r9516 r9522  
    219219{
    220220    if (fTrackType<0)
    221         sla.Set(fTrackPos);
     221        sla.Set(fTrackPos/TMath::DegToRad());
    222222    else
    223223        sla.SetPlanet((ePlanets_t)fTrackType);
    224224
    225     if (fCosy->fStarguider)
    226         fCosy->fStarguider->SetPointingPosition(sla.GetRaDec());
     225//    if (fCosy->fStarguider)
     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;
    227229}
    228230
     
    232234    UpdateSlalib(fSlalib);
    233235
    234     fCosy->fRaDec     = fSlalib.GetRaDec();
     236    fCosy->fRaDec     = fSlalib.GetRaDecRad();
    235237    fCosy->fHourAngle = fSlalib.GetHourAngle();
    236238}
     
    244246bool MTracking::Move()
    245247{
    246     const RaDec &dst = fSlalib.GetRaDec();
    247 
    248     ZdAz dest = fSlalib.GetZdAz();//fSlalib.CalcZdAz(dst);
    249 
     248    const RaDec &dst = fSlalib.GetRaDecRad();
     249
     250    ZdAz dest = fSlalib.GetZdAzRad();//fSlalib.CalcZdAz(dst);
     251
     252    if (fTrackType<0)
     253       gLog << all << fSlalib.GetTime() << ": Tracking Planet" << endl;
    250254    gLog << all << fSlalib.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl;
    251255
     
    275279void MTracking::TrackPosition(const RaDec &dst)
    276280{
     281
     282//    gLog << all << "=====> dst.Ra()=" << dst.Ra() << " dst.Dec()=" << dst.Dec() << "   (deg?)" << endl;
     283
    277284    fTrackPos  = dst;
    278285    fTrackType = -1;
     
    317324    //fCosy->fRaDec = fSlalib.GetRaDec();
    318325
    319     ZdAz pos = fSlalib.GetZdAz();//fSlalib.CalcZdAz(fSlalib.GetRaDec());
     326    ZdAz pos = fSlalib.GetZdAzRad();//fSlalib.CalcZdAz(fSlalib.GetRaDec());
    320327
    321328    // Some output
     
    355362        // Request Target position for Now+dt
    356363        //
    357         UpdateSlalib();
     364        UpdateSlalib(dt);
    358365        //fCosy->fRaDec = fSlalib.GetRaDec();
    359366
     
    361368        // Request nominal position for this time in the future (To+dt)
    362369        //
    363         const ZdAz pointing = fSlalib.GetZdAz(); //fSlalib.CalcZdAz(fSlalib.GetRaDec()); // [rad]
     370        const ZdAz pointing = fSlalib.GetZdAzRad(); //fSlalib.CalcZdAz(fSlalib.GetRaDec()); // [rad]
    364371        ZdAz dest = fCosy->AlignTrackingPos(pointing);     // fix ambiguity
    365372
     
    452459    gLog << inf2 << "- Tracking Thread started (" << MTime(-1) << ")" << endl;
    453460
    454     SlaPlanets sla(fSlalib.GetObservatoryKey());
     461    //SlaPlanets sla(fSlalib.GetObservatoryKey());
     462    SlaPlanets sla(MObservatory::kMagic1);
     463//    gLog << all << "====> KEYS " << (int)fSlalib.GetObservatoryKey() << " " << (int)sla.GetObservatoryKey() << " " << (int)fCosy->fObservatory << endl;
    455464
    456465    UpdateSlalib(sla);
     
    498507            UpdateSlalib(sla, mjdzd);
    499508
    500             ZdAz dummy = sla.GetZdAz();//sla.CalcZdAz(radec, mjdzd);
     509            ZdAz dummy = sla.GetZdAzRad();//sla.CalcZdAz(radec, mjdzd);
    501510            dummy = fCosy->AlignTrackingPos(dummy);
    502511            fCosy->fZdAzSoll.Zd(dummy.Zd());
     
    509518            UpdateSlalib(sla, mjdaz);
    510519
    511             ZdAz dummy = sla.GetZdAz();//sla.CalcZdAz(radec, mjdaz);
     520            ZdAz dummy = sla.GetZdAzRad();//sla.CalcZdAz(radec, mjdaz);
    512521            dummy = fCosy->AlignTrackingPos(dummy);
    513522            fCosy->fZdAzSoll.Az(dummy.Az());
  • trunk/MagicSoft/Cosy/tcpip/MDriveCom.cc

    r9516 r9522  
    138138    Float_t dra, ddec;
    139139    Int_t n=sscanf(str.Data(), "%d %f %f %n", &id, &dra, &ddec, &len);
    140     if (n!=1)
     140    if (n!=3)
    141141    {
    142142        gLog << warn << "WARNING - Not enough argmuents (CELEST)." << endl;
Note: See TracChangeset for help on using the changeset viewer.