# How to make projection from altitude and azimuth to screen with screen coordinate system?

Thanks to @ohoh for helped translate ra and dec into alt and az. Now that I have this data(altitude and azimuth), how can I plot it in something like this, with the coordinate system going like this?

• – Mike G Sep 11 '20 at 18:23

The example sky map appears to be a stereographic projection; circles of right ascension and declination are projected as circular arcs, and their intersections are projected as right angles. The example has a 195° field of view, and the eastern and western horizons are mislabeled.

Let the celestial sphere be centered at the origin with radius 1, zenith at (0, 0, 1), northern horizon at (0, 1, 0), and eastern horizon at (1, 0, 0). Assuming azimuth 0° is north: \begin{align} x &= \sin \mathrm{Az} \cos \mathrm{Alt} \\ y &= \cos \mathrm{Az} \cos \mathrm{Alt} \\ z &= \sin \mathrm{Alt} \end{align}

To project from the nadir (0, 0, -1) onto the plane z = 0: $$(x', y') = \left( \frac{x}{z + 1}, \frac{y}{z + 1} \right)$$

To fit this between (0, 0) and (2R, 2R) on a canvas with northern horizon at (R, 0) and eastern horizon at (0, R), scale by -R and translate by (RR): $$(X, Y) = (R(1 - x'), R(1 - y'))$$

For a sky map centered overhead, if north is up, east should be on the left.

• This is so cool! I'm gonna give it a try.. – uhoh Apr 21 '20 at 6:10
• Thanks you and uhoh for helping me out with this project. I owe you big time! – maisteRR Apr 21 '20 at 9:13
• Can I ask you last question? how can i calculate the coordinates for the grid as in the screenshot? – maisteRR Apr 21 '20 at 20:41
• @maisteRR Those appear to be at intervals of 10° in declination and 1h (15°) in right ascension. Process your synthetic grid points the same way as the star data. – Mike G Apr 22 '20 at 3:43
• @MikeG, thanks, but I'm a little confused. This mean, that I must get alt and az for value "previous dec val + 10" and "previous RA + 15" every time when I getting coords the star? I know, most likely I'm wrong and should do it in another way. Can you give one more hint? – maisteRR Apr 22 '20 at 23:06