Ignore:
Timestamp:
11/21/11 13:02:19 (13 years ago)
Author:
tbretz
Message:
Added some more output. Fill fCosy->fMJD and update nominal RaDec during tracking; changed the control loop parameters and the position alignment for FACT
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosy/main/MTracking.cc

    r10024 r12595  
    292292        return kFALSE;
    293293
    294     fCosy->fRaDec     = fSlalib.GetRaDecRad();
    295     fCosy->fHourAngle = fSlalib.GetHourAngle();
    296 
    297294    return kTRUE;
    298295}
     
    318315    // culminating before the zenith (north) we want the star to be
    319316    // aligned between -180 and 180deg (which is the default of CalcZdAz)
     317
     318#ifdef FACT
     319    if (fSlalib.GetPhi()>dst.Dec() && dest.Az()>0)
     320    {
     321        // align az from -180/180 to 0/360
     322        gLog << inf2 << "Star culminating behind zenith: Adding 360deg to Azimuth " << dest.Az()*kRad2Deg << endl;
     323        dest.Az(dest.Az() - TMath::TwoPi());
     324    }
     325#else
    320326    if (fSlalib.GetPhi()>dst.Dec() && dest.Az()<0)
    321327    {
     
    324330        dest.Az(dest.Az() + TMath::TwoPi());
    325331    }
     332#endif
    326333
    327334    // Position the telescope to the current local position of the
     
    419426    //
    420427    // *OLD*const float dt = 1;  // 1 second
     428#ifdef FACT
     429    const float dt = 7.6;//3;  // 2 second
     430#else
    421431    const float dt = 5;//3;  // 2 second
     432#endif
    422433    while (!Break()/* && !fCosy->HasError() && !fCosy->HasZombie()*/)
    423434    {
     
    522533        // (This is important on fast machines >500MHz)
    523534        //
    524         usleep(1000000); // 1s
     535#ifdef FACT
     536        usleep(760000/4); // 1.4s
     537#else
     538        usleep(1000000);
     539#endif
    525540
    526541        //
     
    529544        //
    530545        if (!fCosy->fMac1->IsRpmActive() || !fCosy->fMac2->IsRpmActive())
     546        {
     547            gLog << warn << fSlalib.GetTime() << " - RPM mode not active anymore." << endl;
    531548            break;
    532     }
     549        }
     550    }
     551
     552    if (fCosy->Break())
     553        gLog << all << fSlalib.GetTime() << " - Break signal received." << endl;
     554    if (fCosy->HasError())
     555        gLog << all << fSlalib.GetTime() << " - HasError received." << endl;
     556    if (fCosy->HasZombie())
     557        gLog << all << fSlalib.GetTime() << " - HasZombie received." << endl;
    533558
    534559    fSlalib.Now();
    535560
    536561    CancelThread();
     562    fCosy->fMJD = 0;
    537563
    538564    // If CancelPoints are used we have to make this a Cleanup!
     
    600626            ZdAz dummy = sla.GetZdAzRad();
    601627            dummy = fCosy->AlignTrackingPos(dummy);
     628            fCosy->fRaDec = sla.GetRaDecRad();
     629            fCosy->fHourAngle = sla.GetHourAngle();
     630            fCosy->fMJD = mjdaz;
    602631            fCosy->fZdAzSoll.Zd(dummy.Zd());
    603632            fCosy->fTrackingError.Zd(fCosy->fBending(dummy).Zd()-istse.Zd());
     
    611640            ZdAz dummy = sla.GetZdAzRad();
    612641            dummy = fCosy->AlignTrackingPos(dummy);
     642            fCosy->fRaDec = sla.GetRaDecRad();
     643            fCosy->fHourAngle = sla.GetHourAngle();
     644            fCosy->fMJD = mjdaz;
    613645            fCosy->fZdAzSoll.Az(dummy.Az());
    614646            fCosy->fTrackingError.Az(fCosy->fBending(dummy).Az()-istse.Az());
Note: See TracChangeset for help on using the changeset viewer.