The Trust appointed Gordon E. Taylor (formerly of the Royal Greenwich Observatory) as its astronomical consultant. The base of the Sundial Pillar had to be aligned in a North-South direction, but how does one determine direction accurately in a crowded, built-up area such as Seven Dials? Certainly nothing as crude as a magnetic compass can be used. Helpfully, John Strype's 1723 map illustrated both the final layout of Seven Dials and the base of the Sundial pillar with a degree of accuracy confirmed in John Rocque's map of 1745. The latter also illustrates the early street names - the Monmouth Street on the top left is now Shaftesbury Avenue.
The direction ('azimuth' in astrological terminology) of the Sun was noted at certain times by marking the shadow line cast by a vertical rod onto the ground. These times were recorded using a digital watch which displayed GMT to an accuracy of one second. These times, together with the longitude and latitude of Seven Dials, were fed into a computer. A specially-written programme was used to call up a data file containing an ephemeris (a set of positions) of the sun in astronomical coordinates, and its position in the sky as seen from Seven Dials at the observed times was calculated. From this a true North-South line was derived.
The mathematical knowledge necessary to construct accurate sundials, whether trigonometrical or the geometry of projection, was part of Renaissance Europe's rediscovery of ancient mathematics and discoveries pioneered in the Arab world. In the mid ninth century, Muhammed Ibn Jafir Al-Battani first solved a spherical triangle, given two sides and the included angle. At the beginning of the thirteenth century, Ali Ibn Omar Abul-Hassan al-Marrakushi introduced the idea of making all the hours of equal length. Astronomy flourished throughout the Muslim world from the ninth through to the sixteenth century, from Arab states, through Persia into Central Asia.
In Europe, these discoveries coincided with an upsurge of interest in recreational mathematics and an everyday need for reliable public timepieces. So sundials were erected in public places to regulate the growing number of clocks which, though popular, were still unreliable and inaccurate, amusingly illustrated in the contemporary quotation from the Athenian Mercury (1692/3).
For more detail, read below: Gnomonics – The Construction of Sundials written by Frances Massison, Curator Museum of the History of Science, University of Oxford: