Changeset 5283


Ignore:
Timestamp:
10/18/04 18:48:57 (20 years ago)
Author:
merck
Message:
MMerck: Added code to simulate infinity focusing by adding an
MMerck: extra correction to the location of the focal plane.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/amcmirrorpanel.cpp

    r4508 r5283  
    1717#include <math.h>
    1818#include <qstring.h>
     19
     20extern bool         g_zInfinityFocus;
    1921
    2022AMCMirrorPanel::AMCMirrorPanel( int i, int j, int iType, int iPort, int iBox, int iDriver)
     
    6668                                                                                                                                                                        // paper or styropor surface) to the PMT camera
    6769                                                                                                                                                                        // plane (front of winston cone surface)
     70  const double kDistInfinityFocus = 30.0; // Difference in focal plane for
     71                                                                                                                                                                        // 10 km and infinity focusing.
    6872
    6973        /*
     
    199203   */
    200204  double dFocus = kDistMirror + kFocPlaneRoque;
    201   double dCorrection2 = (dMirrorRadius / (dFocus - dHeightMirror - kDistWinstonCones) ) * kDistWinstonCones;
     205  double dFocusShift;
     206  if ( g_zInfinityFocus )
     207          dFocusShift = kDistWinstonCones + kDistInfinityFocus;
     208  else
     209          dFocusShift = kDistWinstonCones;
     210
     211  double dCorrection2 = (dMirrorRadius / (dFocus - dHeightMirror - dFocusShift) ) * dFocusShift;
    202212
    203213        return ( (dCorrection1 + dCorrection2) / 2.0 );
Note: See TracChangeset for help on using the changeset viewer.