Changeset 14861 for trunk


Ignore:
Timestamp:
02/04/13 10:34:12 (12 years ago)
Author:
tbretz
Message:
Updated all functions related to MAstro::GetDevAbs - they might however still need some check for signs.
Location:
trunk/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mpointing/MPointingDevCalc.cc

    r14852 r14861  
    742742    // Calculate absolute deviation
    743743    const Double_t dev = MAstro::GetDevAbs(fReport->GetNominalZd(),
    744                                            fReport->GetCurrentZd(), devaz);
     744                                           fReport->GetNominalZd()-fReport->GetDevZd()/60,
     745                                           devaz);
    745746
    746747    // Sanity check... larger deviation are strange and ignored
  • trunk/Mars/mreport/MReportDrive.cc

    r12734 r14861  
    102102Int_t MReportDrive::InterpreteFits(const std::fits &fits)
    103103{
    104     fCurrentZd = fNominalZd + fErrorZd;
    105     fCurrentAz = fNominalAz + fErrorAz;
     104    fCurrentZd = fNominalZd - fErrorZd;
     105    fCurrentAz = fNominalAz - fErrorAz;
    106106
    107107    return kTRUE;
     
    184184Double_t MReportDrive::GetAbsError() const
    185185{
    186     return MAstro::GetDevAbs(fNominalZd, fErrorZd, fErrorAz);
    187 /*
    188     // For the algorithm see also MReportStarguider
    189     const Double_t pzd = fNominalZd*TMath::DegToRad();
    190     const Double_t azd = fErrorZd  *TMath::DegToRad();
    191     const Double_t aaz = fErrorAz  *TMath::DegToRad();
    192 
    193     const double el = TMath::Pi()/2-pzd;
    194 
    195     const double dphi2 = aaz/2.;
    196     const double cos2  = cos(dphi2)*cos(dphi2);
    197     const double sin2  = sin(dphi2)*sin(dphi2);
    198     const double d     = cos(azd)*cos2 - cos(2*el)*sin2;
    199 
    200     //
    201     // Original:
    202     //   cos(Zd1)*cos(Zd2)+sin(Zd1)*sin(Zd2)*cos(dAz)
    203     //
    204     // Correct:
    205     //   const double d = cos(azd)*cos2 - cos(el1+el2)*sin2;
    206     //
    207     // Estimated:
    208     //   const double d = cos(azd)*cos2 - cos(2*el)*sin2;
    209     //
    210 
    211     return acos(d)*TMath::RadToDeg();*/
     186    return MAstro::GetDevAbs(fNominalZd, fCurrentZd, fErrorAz);
    212187}
    213188
  • trunk/Mars/mreport/MReportStarguider.cc

    r8601 r14861  
    196196Double_t MReportStarguider::GetDevAbs() const
    197197{
    198     return MAstro::GetDevAbs(fNominalZd, fDevZd/60, fDevAz/60)*60;
    199     /*
    200      // For the algorithm see also MReportDrive
    201      const Double_t pzd = fNominalZd * TMath::DegToRad();
    202      const Double_t azd = fDevZd/60  * TMath::DegToRad();
    203      const Double_t aaz = fDevAz/60  * TMath::DegToRad();
    204 
    205      const double el = TMath::Pi()/2-pzd;
    206 
    207      const double dphi2 = aaz/2.;
    208      const double cos2  = cos(dphi2)*cos(dphi2);
    209      const double sin2  = sin(dphi2)*sin(dphi2);
    210      const double d     = cos(azd)*cos2 - cos(2*el)*sin2;
    211 
    212      return acos(d)*TMath::RadToDeg()*60;
    213      */
     198    // Crosscheck SIGN!!!!
     199    return MAstro::GetDevAbs(fNominalZd, fNominalZd-fDevZd/60, fDevAz/60)*60;
    214200}
    215201
Note: See TracChangeset for help on using the changeset viewer.