Telescope Dome Synchronising

How to synchronise your arduino dome slot with your GOTO telescope.

For successful automated astrophotography, the slot in the observatory dome must be synhronised with the
telescope as it tracks the sky and performs slews.
In most cases, use of ASCOM will mean that you do not have to worry about the calculation of the dome
azimuth - this is all done for you after correct configuration.
In some cases you may wish to implment your own code to perform this calculation. The problem is not as
simple as it might first appear. One cannot simply set the dome slot azimuth to the pointing azimuth of the
telescope. With a GEM mount the correct solution can appear unintuitive.

Take the following example:
Telescope pointing due south at the horizon. Scope on the east side of the pier. Putting the dome slit at
180 is not the correct solution. The scope is hanging out to one side. The required dome azimuth is more
like 160 degrees - depending on various factors.

The "factors" are broadly......

First of all, introduce a COG, centre of gravity, of the mount, this is the intersection of the RA and DEC
axis.

Also define the "origin" of the dome. The dome is a hemisphere. The origin is the middle of the sphere.

Immediately we notice the COG of the mount is never going to be at the origin of the dome unless your
building is very well designed. There will be a fixed x,y,z offset. We will say that x = north+ and y =
east+. Z is up/down

Next the radius of the dome is a factor. In my case it is not a fixed radius.

The optical axis of the telescope will not pass through this COG. There will be an Optical-COG offset.
PRobably in the order of 100-300mm

Taking the above case, even with x=y=z=0 the COG-Optical (COGO) will mean the dome azimuth has to be a bit
further east than 180. If x=y=z=COGO then the azimuth would be 180.
This is now aparently a more complex problem but the solution is straightfoward using the proper
mathematics.

Be warned
: Some of the solutions I have seen on the internet are horrendously over complicated and try and
do the whole thing with trigonometry.

With vectors, the solution is a joy.

First we define c, the origin, centre of the dome. (0,0,0)

Next we have the vector to the mount cog, this never changes. (x1,y1,z1).

Now we need to find the intersection of the Dec-optical (DOI) relative to (x1,y1,z1), we call this (x2,y2,z2). This does move around. If we say r is the
COG-optical length, we imediately see that the DOI perscribes parts of a sphere around (x1,y1,z1) with
radius r. So we simply use the standard 3d polar to cartesian conversion from any geometry text book. Note
that the DOI point will not reach all parts of the sphere.

In our case, θ is hour angle and φ is latitude - all assuming we are on a polar aligned mount!

We add (x1,y1,z1) to (x2,y2,z2) whic gives us a vector, o, which is the DOI point relative to the dome
origin.

Now we define unit vector , l, which is the direction the telescope is pointing. Here we can just use the
alt and azimuth from the telescope.

For changes to the mount sideofpier we simply negate (x2,y2,z2) before adding to (x1,y1,z1)

In my case, the radius of my dome is not constant with elevation. It is more box shaped. However Acos(z / domeR ) gives the elevation of the intersection, and one can simply iterate the above algorithm for a different radius.

For practical programming, the Math.net programming library makes this into a few simple lines of code.