In accordance with the present invention, the aircraft security system utilizes an initialization mode for improving the system reliability and compensating for environmental factors such as temperature variations, ambient light, dirt, vibration or other factors which may affect the outputs of sensor 16.