Changeset 9554 for trunk


Ignore:
Timestamp:
02/25/10 11:26:20 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Changelog

    r9553 r9554  
    44   * main/MMoonPointing.h:
    55     - changed comment
     6     - added a few sanity checks to avoid unnecessary calculations
    67
    78   * main/MTracking.[h,cc]:
    89     - changed internal units of offsets to rad
     10     - interpret result of moon.CalcPosition correctly
     11
     12   * catalog/SlaStars.[h,cc]:
     13     - removed obsolete ApplyOffset
    914
    1015
  • trunk/MagicSoft/Cosy/catalog/SlaStars.cc

    r9550 r9554  
    2121{
    2222    fAltAz = AltAz(TMath::Pi()/2-zdaz.Zd(), zdaz.Az()) * TMath::DegToRad();
    23     fRaDec = CalcRaDec(fAltAz);
    24 }
    25 
    26 void SlaStars::ApplyOffsetAltAz(const AltAz &offset)
    27 {
    28     fAltAz += offset;
    2923    fRaDec = CalcRaDec(fAltAz);
    3024}
  • trunk/MagicSoft/Cosy/catalog/SlaStars.h

    r9550 r9554  
    6161    ZdAz   CalcZdAzFast (const RaDec &radec) const;
    6262
    63     void   ApplyOffsetAltAz(const AltAz &offset);
    64     void   ApplyOffsetZdAz(const ZdAz &offset) { ApplyOffsetAltAz(AltAz(-offset.Zd(), offset.Az())); }
    65 
    6663    ClassDef(SlaStars, 0)
    6764};
  • trunk/MagicSoft/Cosy/main/MMoonPointing.cc

    r9551 r9554  
    119119Bool_t MMoonPointing::CalcPosition(const ZdAz &moon, ZdAz &srcpos, ZdAz &pointpos) const
    120120{
     121    // Avoid unnecessary calculations
     122    if (fOffsetShadow==0)
     123    {
     124        pointpos = srcpos = moon;
     125        return kTRUE;
     126    }
     127
    121128    const Double_t fcos = const_cast<TGraph2D&>(fCos).Interpolate(moon.Az(), moon.Zd());
    122129    const Double_t fsin = const_cast<TGraph2D&>(fSin).Interpolate(moon.Az(), moon.Zd());
     
    133140        return kFALSE;
    134141
     142    // Avoid unnecessary calculations
     143    if (fOffsetWobble==0)
     144    {
     145        pointpos = srcpos;
     146        return kTRUE;
     147    }
     148
    135149    // Calaculate Telescope pointing position:
    136150    const MPositionOffsetCalc calc2(fOffsetWobble, cs, sn);
Note: See TracChangeset for help on using the changeset viewer.