Ignore:
Timestamp:
02/14/03 17:12:58 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/main/MCosy.cc

    r1742 r1757  
    391391{
    392392    // FIXME: Correct by fOffset ?
     393
     394    const ZdAz d = dst*kRad2Deg;
     395    if (d.Zd()<fMin.Zd() || d.Zd()>fMax.Zd() || d.Az()<fMin.Az() || d.Az()>fMax.Az())
     396    {
     397        lout << "ERROR: Requested Position not inside allowed range." << endl;
     398        return kFALSE;
     399    }
     400
    393401
    394402    /*
     
    724732        ZdAz dummy = fBending(sla.CalcZdAz(fRaDec));
    725733        dest = CorrectTarget(GetSePos(), dummy); // [se]
     734
     735        const ZdAz d = dest*360./16384; // [deg]
    726736        dest *= kGearRatio;  // [re]
     737
     738        if (d.Zd()<fMin.Zd() || d.Zd()>fMax.Zd() || d.Az()<fMin.Az() || d.Az()>fMax.Az())
     739        {
     740            lout << "ERROR: Calculated position for T+dt not inside allowed range." << endl;
     741            break;
     742        }
    727743
    728744        ZdAz vcalc = sla.GetApproxVel(fRaDec) * kGearRatio2*4./60.;  // [re/min]
     
    10701086    TEnv env(".cosyrc");
    10711087    cout << "done." << endl;
     1088
     1089    cout << "Reading telescope range..." << flush;
     1090    const Double_t amin = env.GetValue("Az_Min", -90.0);
     1091    const Double_t zmin = env.GetValue("Zd_Min", -90.0);
     1092    fMin.Set(zmin, amin);
     1093
     1094    cout << " Min: " << zmin << "deg  " << amin << "deg" << endl;
     1095
     1096    const Double_t amax = env.GetValue("Az_Max", 318.0);
     1097    const Double_t zmax = env.GetValue("Zd_Max", 100.0);
     1098    fMax.Set(zmax, amax);
     1099
     1100    cout << " Max: " << zmax << "deg  " << amax << "deg" << endl;
    10721101
    10731102    cout << "Reading gear ratios..." << flush;
  • trunk/MagicSoft/Cosy/main/MCosy.h

    r1703 r1757  
    8383    ZdAz  fAccuracy;      // Actual accuracy of Tracking
    8484    ZdAz  fVelocity;      // Actual velocity of Tracking
     85    ZdAz  fMin;
     86    ZdAz  fMax;
    8587
    8688    XY kGearRatio;        // describing the gear of the system [re/se]
Note: See TracChangeset for help on using the changeset viewer.