Not sure exactly what you are trying to achieve but there are lots of INDI scope drivers which will return RA, DEC and Pier side.

And the base INDI dome driver, on which a driver for real dome hardware is built, has code to get this data from the scope driver and do the conversion to dome position.

Read More...