An astrolabe is a primitive angle-measuring tool. It can be used to - very in-exactly! - measure the altitude above the horizon of a celestial body like the Sun, Moon or Polaris in order to calculate your position.
Medieval gunners used the astrolabe to calculate the height of towers and buildings, in order to more accurately aim their cannons.