Al-Ashraf Umar II


al‐Malik al‐Ashraf ʿUmar ibn Yūsuf ibn ʿUmar ibn ʿAlī ibn Rasūl was the third Rasulid sultan and a polymath. He is known for writing the first description of the use of a magnetic compass for determining the qibla. Also, his works on astronomy contain important information on earlier sources.
In a treatise about astrolabes and sundials, al-Ashraf includes several paragraphs on the construction of a compass bowl. He then uses the compass to determine the north point, the meridian, and the Qibla towards Mecca. This is the first mention of a compass in a medieval Islamic scientific text and its earliest known use as a Qibla indicator, although al-Ashraf did not claim to be the first to use it for this purpose.