PROBLEM TO BE SOLVED: To adapt for a detecting/measuring apparatus for automatic operation, while ensuring miniaturization of a rail displacement detector and improvement in its measuring accuracy.
SOLUTION: Rotating mirrors 9, 11 are interposed between a rail 2 and optical distance sensors 7, 8. Rotation angles of the rotating mirrors 9, 11 are controlled by servomotors 15, 17, a servo circuit and angle detectors 16, 18, while a tracking is performed so that horizontal and vertical measurement reference points 3, 6 fixed to the rail 2 are measurement points for respective horizontal and vertical optical distance sensors 7, 8. The miniaturization of the apparatus is ensured by use of the rotating mirrors 9, 11. Horizontal and vertical positions of the rail 2 can be determined as values computed from outputs of the two optical distance sensors 7, 8 without corrections for ensuring improvement in measuring accuracy. Also, to cope with hard initialization during power input, a scanning method by the rotating mirrors 9, 11 is employed, while a geometrical optical relation is computed.