# How did the Arabs determine the longitudes of cities?

I am reading the book by Berggren, 'Episodes in the mathematics of medieval islam'. An important problem is determing the direction of Mecca with respect to a local city. The book introduced a method invented by Al-Biruni.

But it is based on the assumption that both the coordinates (latitudes and longitudes) of Mecca and the locality are known. While it is relatively easy to determine the latitude of a point, I cannot see how to determine the difference in longitude between two points.

So what is the ancient trick?

In the determination of the difference in longitude between two places [on earth] from an eclipse of the moon it is necessary that for the measurement one be equipped with two very accurate instruments which have been tested by two men of learning and experience.... It is also necessary that the two know accurately the place where the earth's shadow enters upon the edge of the moon's disk in order that the gaze may be directed unflinchingly at the place of contact,... And in regard to that which lies between the two moments of this contact and the moment when this eclipse becomes evident, certain of the earlier astronomers have said that in the interval between these two moments $1^{\circ} 49'$ of the equator turns and this makes $7$ minutes $16$ seconds of equivalent time.