Ignore:
Timestamp:
12/01/09 10:57:14 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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());
Note: See TracChangeset for help on using the changeset viewer.