The old problem
Earlier estimates (Eratosthenes, al-Maʾmūn’s astronomers) needed travel over long distances; al-Bīrūnī’s method was carried out on one site (Paris Observatory dictionary).
Where
At Nandana Fort in the Salt Range, Punjab (today Pakistan), overlooking a wide plain, during his travels linked to Maḥmūd of Ghazna’s court.
Step 1: hill height
Two astrolabe sightings of the summit from points on a straight line, plus the distance between them, give the hill height—about 321.5 m.
Step 2: dip of the horizon
From the top he measured a dip of 0°34′. Then R = h·cosθ / (1 − cosθ), giving roughly 6,336 km—close to the modern ~6,371 km.
Limits
The plain was not as flat as a sea surface, the instrument’s precision (~5′) was coarse for such a small angle, and atmospheric refraction shifts the horizon—so the close match is partly luck.
Further reading
Reference links for verification. This article is original Vemetto wording and does not copy source text.