Instrument for measuring altitude of celestial bodies