A system is disclosed. The system contains an instrument configured to fit in a patient's anatomy, an optical sensor associated with the instrument, a processing unit receiving data from the optical sensor, and a display displaying position of the instrument in the patient's anatomy based on the data from the optical sensor.