## Dome CalculationThis article discusses the maths involved in the proper calculation of the dome slit position for a side-by-side set-up as in use at InFINNity Deck. At the bottom of this page there is an interactive form to support programmers in testing their own implementation of the algorithms. The code itself can be found here. This article is also available as a pdf-file. ## Dome control for a side-by-side set-upFigure 1: The side-by-side set-up at InFINNity-Deck. The imaging scope is a 150mm apochromat (the one on top).Although perhaps still not common, the use of side-by-side mounted telescopes within a domed observatory has its application in astrophotography. When imaging throughout the night, the dome has to be controlled in a way that light from heavenly objects is allowed to pass through the dome's slit onto the telescopes. When using a fork-mounted telescope, and assuming that its centre of rotation is set-up in the geometrical centre of the dome, the direction into which the dome's slit has to point equals the azimuth of the telescope. When using a German equatorial mount (GEM), this gets more complicated as the scope sits at the end of the declination (DEC) axis, which moves around the intersection of the right ascension (RA) and DEC axis, at a distance known as the GEM-offset. When a side-by-side set-up is used, the weight difference between the telescopes may cause the set-up to be laterally off-centred, while during automated operation perhaps only one of the scopes is required to look through the slit. Adding a lateral offset (LAT-offset) in the calculations allows for more accurate positioning of the slit for side-by-side installations and by that allow longer periods without dome-slews, therefore reducing settling times and thus increasing imaging time. This article deals with the mathematics required to accurately control a dome when used with a LAT-offset in a side-by-side set-up. As an amateur astronomer I have the luxury to have my own private observatory on top of our home, InFINNity Deck (see figure 1). It is used for visual observations and for astrophotography. The most commonly used applications for imaging automation do allow for the GEM-offset (distance A-B in figure 1) in their dome control algorithms, but it is assumed that the set-up consists of a single telescope mounted at the centre of the DEC-axis. When using a side-by-side set-up, like at InFINNity Deck, the telescope no longer occupies this central position, but is displaced sideways. This displacement can be corrected by adding the lateral offset (LAT-offset, distance B-C in figure 1) to the calculations. As mentioned above in the currently available applications it is assumed that, viewed in the lateral direction, the scope is mounted in the centre of the RA-axis. In such a set-up the telescope moves along an oblique circular plane with a radius equal to this GEM-offset (see figure 2, point A is the intersection between the RA and DEC axis). The mathematics required to control a dome for this situation have been explained in an article by R. Kent Honeycutt and James E. Kephart in 1982. ^{1} Their method, however, did not include the LAT-offset, while their mathematics did not directly provided a solution to a programmer. Honeycutt and Kephart based their calculations on a horizontal Cartesian coordinate system that had its positive axis facing west and south. Coming from a surveying background I am used to have the positive axis point in the directions east and north, while the first application in which my algorithm has been tested, Mount Wizzard 4 (MW4), has the positive directions north and west. MW4 is an application used for model-building, a method to determine the polar-alignment of a mount, based on a number of sky-targets that are defined in horizontal angular coordinates. Honeycutt & Kephart and MW4 have the zenith axis positive going upwards, which follows the surveying convention. For ease of testing I have decided to follow the conventions of MW4 and also followed the naming conventions for the axis:- X-axis: runs north-south, north is positive;
- Y-axis: runs east-west, west is positive;
- Z-axis: runs vertical, upwards is positive;
- Lateral offset: + when OTA is east of centre at park position with the scopes pointing towards Polaris and the counterweight in the direction with an azimuth of 0 degrees;
- GEM offset: always positive.
## STEP 1: Conversion to local hour angleIf we want to calculate the azimuth to which the dome's slit has to move, we need to know the position of the telescope (x _{t}, y_{t}, z_{t}, point C in figure 2) in relation to the geometrical centre of the dome (x_{d}, y_{d}, z_{d}), which is presumed to be (0,0,0), and the vector towards the celestial object (a_{c}, b_{c}, c_{c}). In order to be able to use these horizontal angular coordinates to calculate the vector (a_{g}, b_{g}, c_{g}) along the GEM-offset, we first need to convert the azimuth (A, taken clockwise from north) and altitude (a) to equatorial ones using the observatory's latitude (φ).^{2} The declination (δ) follows from:
Using the declination from [1.1] the local hour angle (LHA) can be calculated:
The resulting LHA' is calculated within the two meridian quadrants ranging from -90° to +90°, in order to find LHA the complement with 180° is taken when the azimuth is within the two anti-meridian quadrants:
## STEP 2: Calculating the vector to the celestial objectThe horizontal angular coordinates are used to calculate the vector (a _{c}, b_{c}, c_{c}) to the celestial object. I based this on the equations given by Honeycutt and Kephart, but swapped a_{c} and b_{c} and inverted the sign of a_{c} and to match my coordinate system:
STEP 3: The vector towards the GEM-offsetIn order to go from the intersection of the RA and DEC axis on the mount to the centre of the telescope two vectors need to be calculated: the vector (a _{g}, b_{g}, c_{g}) from the intersection of the RA and DEC axis towards the GEM-offset (points A and B in figure 2), and the vector (a_{l}, b_{l}, c_{l}) from the GEM-offset to the LAT-offset (points B and C in figure 2). The former is taken from Honeycutt and Kephart, but again modified to match my coordinate system and leaving out the height above the dome base as it is more logical to add that later on. The sign of each part of the vector depends on the side of the pier the telescope is at (the length of the GEM-offset is indicated as G):^{3}
## STEP 4: The vector towards the lateral-offsetThe LAT-offset vector (a _{l}, b_{l}, c_{l}) is always perpendicular to the vector (a_{c}, b_{c}, c_{c}) towards the celestial object and to vector (a_{g}, b_{g}, c_{g}) towards the GEM-offset. It can be calculated by taking their cross product:
Or in each coordinate as:
Where (i, j, k) is the vector in the correct direction, but still of the length of the GEM-offset. To get the LAT-offset vector (a _{l}, b_{l}, c_{l}) the vector (i, j, k) is divided by the length of the GEM-offset (G) and multiplied with the LAT-offset (L):
The resulting vector (a _{l}, b_{l}, c_{l}) can be tested by taking the absolute value of this vector, which should equal the LAT-offset (L).## STEP 5: The coordinates of the telescopeFor calculating the centre of the telescope in relation to the centre of the dome we need to know the offset from the dome centre (0,0,0) to the base of the mount (x _{m}, y_{m}, z_{m}), the offset from the mount's base to the latitude axis (see x_{la} and z_{la} in figure 3)^{4}, and the offset from the latitude axis to the intersection of the RA and DEC axis (x_{rd}, y_{rd}, z_{rd})^{5}. Dimension (x_{m}, y_{m}, z_{m}) needs to be measured in the observatory (assuming the geometrical centre of the dome is (0,0,0)), dimension (x_{la},y_{la}, z_{la}) is defined by the make and model of the mount, while dimension (x_{rd}, y_{rd}, z_{rd}) depends on the dimension D between the latitude axis and the intersection of the RA and DEC axis of the mount (see figure 3)^{6} and the latitude (φ) of the location at which the mount stands. In each coordinate the latter can be calculated as:
The centre of the telescope (x _{t}, y_{t}, z_{t}) now follows from:
## STEP 6: The intersection with the domeIn order to find the azimuth of the dome we need to find the intersection from the line towards the celestial object originating from this point (x _{t}, y_{t}, z_{t}) in the direction of vector (a_{c}, b_{c}, c_{c}).^{7} The line is defined as points P(u):
Or in each coordinate as:
A sphere S centred at (0,0,0) with radius r is described by its surface points (x _{s}, y_{s}, z_{s}) as:
Substituting the equation of the line into the sphere gives a quadratic equation of the form
with:
## STEP 7: Check if a solution is foundThe solutions to this quadratic function are described by:
Whether or not the vector (ac, bc, cc) intersects the dome can be checked (and should be checked when implementing this in dome-control software to avoid exceptions when user input is incorrect) by the discriminant (the part of the formula underneath the square root):
If it is less than 0, the vector runs outside the sphere and there is no intersection; If it equals 0, then the vector is a tangent to the sphere, intersecting it at one point only (at u = -n/2m); If it is greater than 0, the vector does intersect the sphere at two points. STEP 8: Choosing the right solutionFor a dome-control application the user input is thus only valid when u is greater than zero. Formula [7.0] contains two solutions (indicated by the plus/minus sign (±)). When using the subtractive form, the intersection at the camera-side of the telescope is found, when using the additive form the intersection with the dome at the objective side (x _{i}, y_{i}, z_{i}) is found. As the latter is the required intersection, u is found by:
## STEP 9: Calculating the intersection with the domeThe intersection (x _{i}, y_{i}, z_{i}) with the dome at the objective side follows from:
Or in each coordinate as:
STEP 10: Calculating the dome's azimuthThe azimuth of the dome can now be found from the difference in X and Y between the dome's centre ( 0, 0 ) and the point of intersection ( x _{i}, y_{i} ) on its surface. For this we first calculate the angle (α):
Depending on the quadrant the vector points at we need to add 180° or 360°:
In addition we can calculate the horizontal distance at which the intersection takes place:
## Some considerationsWhen the telescope's aperture and the width and length of the slit of the dome are known, the horizontal distance between the intersection point (xi, yi) and the dome's centre (xd, yd) can indicate whether or not a dome-slew actually is required. As shown in this article the dome azimuth is calculated from the centre of the dome towards the intersection point of the telescope's optical axis with the dome. These intersections are calculated in 3D, while the required azimuth is calculated from the horizontal coordinates. When taking a steep sight (i.e. close to the zenith), it can well be that the intersection occurs just opposite of the dome's centre. As a result the dome is steered in the opposite direction. How often this happens depends on how high the mount sits within the dome, its horizontal offset to the dome's centre, and the size of the mount itself, including the GEM- and LAT-offsets. On itself these large dome slews can be avoided if the length and width of the slit and aperture of the telescope are taken into account. As long as the distance from the dome's centre remains smaller than the length and width of the slit (corrected for half the aperture on all three sides) the dome needs not to slew. For lower altitudes, the same is true when the azimuth of the target is within the width of the slit (again minus half the aperture on both sides). When implementing this, consideration should be taken with the accuracy with which the dome is steered. At InFINNity Deck the dome is controlled with an accuracy of about 2 degrees, which equals to about 5cm at a radius of 1.5 metres (about one-third the aperture of my deep-sky imaging scope). So for determining whether or not the dome should slew, this amount should be taken into in account when comparing the current dome's azimuth to the newly calculated azimuth. So if the newly calculated azimuth is away from the dome's slit-edge by at least the sum of half the aperture and the dome slew accuracy then no slew is required. The slit of my dome is 80cm wide and runs 40cm overhead, making this margin 7.5 + 5 = 12.5cm, leaving a useable space within the slit of 55cm (roughly 20 degrees for my dome). The downtime due to dome-slews can further be reduced if the slit is positioned as close as possible to the lower hour angle side of the telescope. Only for those targets that are within a circle with radius (90° - φ)/2 and its centre at azimuth 0° and altitude (90°-radius), the slit should be positioned against the higher hour angle side of the telescope to maximise dome-slew intervals. A final note regarding accuracy: Approaching the celestial pole may cause ambiguity in the calculations and, depending on the quality of the polar alignment of the mount, may cause the calculations to seemingly fail as the errors in the mount's azimuth and altitude are not an integral part of the algorithms presented here. ## Notes[1]: R.K. Honeycutt, J.E. Kephart, “Some Applications Of Microcomputers In Observatory Automation”, in: Publications of the Astronomical Society of the Pacific, vol. 94 (1982), pp.605-609.[2]: J. Meeus, Astronomical Algorithms, (Richmond (VA), 2005), pp.91-100. F. Vincent, “Positional Astronomy: Conversion between horizontal and equatorial systems”, 2003, see http://star-www.st-and.ac.uk/~fv/webnotes/chapter7.htm, last accessed 6 June 2020. [3]: In general pier-side is "west" for azimuths between 0° and 180° and "east" for azimuths between approximately 188° and 360°. In the region 180° to 188° the pier-side depends on the amount of time the mount can, or is allowed, to track through the meridian. [4]: The latitude axis is the axis along which the upper part of the mount rotates when adjusting it for its latitude. Dimension yla usually is zero. [5]: Dimension y _{rd} usually is zero.[6]: This dimension again depends on the make and model of the mount. [7]: P. Bourke, “Intersection of a Line and a Sphere (or circle)” (1992), see: http://paulbourke.net/geometry/circlesphere/, last accessed 6 June 2020. ## The dome calculatorConventions: - X-axis: runs north-south, north is positive; - Y-axis: runs east-west, west is positive; - Z-axis: runs vertical, upwards is positive. - Lateral offset: + when OTA is east of centre at park position with the scopes pointing towards Polaris and the counterweight in the direction with an azimuth of 0 degrees. - GEM offset: always positive. All linear measurements can be given in any unit of length as long as the same unit is used for all of them. All linear answers are in the same unit of length as provided. Changing any of below parameters will automatically recalculate the outcome. The pier-side is changed automatically for azimuths between 0° and 180° (pier-side = west) and between 188° and 360° (pier-side = east), but can be changed at will.
If you have any questions and/or remarks please let me know. |

*Astronomy*Literature

InFINNity Deck... Astrophotography...

*Astro-Software...*Astro Reach-out... Equipment...

ASCOM Generic UPS driver ASCOM Envir. SafetyMonitor ASCOM File SafetyMonitor ASCOM SafetyMonitor Hub Astronomical Twilight Log10mGrabber MountCMD MountMonitor

*Dome Calculation*