If a wall mounting vertical sundial is to be designed it is necessary to know the direction the wall faces. To ascertain this is a fairly complicated procedure but, taken step by step, is well within the capability of the enthusiastic diallist.
The procedure is to find the direction of the sun relative to the wall and, for the same time of day, the direction of the sun relative to due south, or it's azimuth. The addition or subtraction of these two values, according to a fixed set of rules, will then give us the angle by which the wall declines east or west of south.
To find the direction of the sun to the wall it is usual to use a nailboard which may be constructed quite easily.
The nailboard comprises a flat rigid wooden board say about 250mm.X 350mm. with a long nail (75mm.) protruding from the centre near the top. Carefully measure and record the length of the nail protruding from the board. A sheet of paper should be pinned below the nail and a pencil line drawn from the base of the nail down the middle of the paper. A plumb line comprising a length of thin string with a weight at one end is hung from the nail and the whole assembly fixed to or placed against the wall and set so that the plumb line hangs directly over the line drawn on the paper. It is important that the board is in the exact plane of the wall.
Carefully mark the position of the end of the shadow of the nail on the paper and note the clock time (GMT in the UK) of the observation. It is a good idea to take several observations say about an hour apart noting the time against each one.
When the observations are complete the paper may be removed from the board and the date and place recorded on it for future reference. Lines at right angles to the centre line should be drawn to each position recorded. (Line AB in Fig.1). The angle of the sun to the wall (Ø) may be calculated from the formula:-
distance AB / exposed length of nail = tan Ø
We now need to obtain the sun's azimuth from the south. This may read off from tables or an ephemeris but if these are not available we have to do it the hard way. This requires the solution of two equations:-
tan M = tan dec / cos t
tan Zs = tan t X cos M / sin (lat - M)
Where M is an intermediate value for use in the second equation, dec is the declination of the sun for the date in question (taken from an ephemeris or almanac), t is the hour angle from noon of the Local Apparent Time (LAT) equivalent of the time of the observation, lat is the latitude of the wall and Zs is the required azimuth of the sun from the south. In winter the declination of the sun is negative giving a negative value for M. The subtraction (lat - M) must therefore be carried out algebraically.
To convert clock time (GMT in the UK) to LAT requires an adjustment for the difference in longitude between the position of the wall and the local time meridian (0º, the meridian of Greenwich, in the UK) and an adjustment for the value of the equation of time for the date of the observation. The conversion is done according to the following rules:-
If sundial time is "fast" (see equation of time):
LAT = Clock time + longitude difference + equation of time
If sundial time is "slow":
LAT = Clock time + longitude difference - equation of time
If sundial time is "fast":
LAT = Clock time - longitude difference + equation of time
If sundial time is "slow":
LAT = Clock time - longitude difference - equation of time
Longitude difference is expressed as time calculated from the relationship one degree of longitude = 4 minutes of time.
LAT must be converted to an hour angle relative to noon using the same relationship. Thus if the LAT is 9.15 AM this is 2 hours 45 minutes before noon giving an hour angle of 41.25º or if LAT is 3.30 PM then the hour angle is 52.5º
We now have the angle of the sun from the wall (Ø) and the azimuth of the sun from south (Zs) and our final answer, the declination of the wall east or west from south, is given by adding or subtracting these values according to the following rules:-
If the sun was to the right of the wall.
The wall declines east by Zs + Ø

If the sun was to the left of the wall and Ø is greater than Zs
The wall declines west by Ø - Zs

If the sun was to the left of the wall and Zs is greater than Ø
The wall declines east by Zs - Ø

If the sun was to the left of the wall.
The wall declines west by Zs + Ø

If the sun was to the right of the wall and Ø is greater than Zs
The wall declines east by Ø -Zs

If the sun was to the right of the wall and Zs is greater than Ø
The wall declines west by Zs - Ø

The whole calculation should be repeated for each observation marked on the nailboard and an average of the results should give an accurate figure for the declination of the wall. The calculations can of course be written into a computer program and my own QBASIC solution is available on request.