VA = EquPA - HorPA
(Note that in many applications this angle is mis-named the ``Parallactic Angle''. Lately this has been promoted by terminology found in the extremely useful SLALIB software by Pat Wallace, but the misnomer can be traced back at least as far as Spherical Astronomy by Smart. The correct usage of Parallactic Angle is in the context of the Equatorial and Ecliptic coordinate systems. In that context it describes the orientation of the ellipse that stellar coordinates traverse due to annual parallax. This was a necessary calculation for correcting the catalog position of objects to their apparent position, and it uses exactly the same spherical trigonometry, but it was a mistake to use the term ``Parallactic Angle'' in the context of the Horizon system.)
Spherical trigonometry gives
sin(h) = sin(phi) * sin(delta) + cos(phi) * cos(delta) * cos(HA)
cos(VA) = (sin(phi)*cos(delta) - cos(phi)*sin(delta)*cos(HA)) / sqrt(1 - sin(h)**2)
sin(VA) = sin(HA) * cos(phi) / sqrt(1 -sin(h)**2)
For a typical 3 mirror Nasmyth configuration this means that NaPA increases in a counter-clockwise direction as seen by an observer who is blocking the light as it attempts to enter the spectrograph.
There are 2 Nasmyth platforms. The telescope elevation is not permitted to pass through the zenith. Using a metaphor wherein the telescope ``faces'' toward some (non-zenith) location in the sky, the ``Right'' Nasmyth platform is on the telescope's right. Similarly for the ``Left'' Nasmyth platform. These definitions hold for any Alt-Az telescope at any latitude. Define NaSign such that NaSign = +1 for the Right platform, and NaSign = -1 for the Left platform.
Given these definitions, the position angle of the slit on the sky is
EquPA = NaPA + (NaSign * h) + VA
The families of EquPA solutions for objects at various declinations have the property that they tend to cluster together at certain hour angles and to spread apart at others. There are two families of solutions for values in the vicinity of NaPA:
NearBranch(b, x) # b is an approximately correct value to which the result must be near # x is the exact PA which is uncertain by 2*n*PI { return x + nint((b-x) / (2*PI)) * (2*PI) } CorrectEquPA(x) # x is the exact EquPA which is uncertain by 2*n*PI { if ( delta > abs(phi) ) { # the object is too far north to encircle the local vertical return NearBranch(NaPA - HA - BrSign * PI, x) } else if ( abs(delta) <= abs(phi) ) { # the diurnal motion of the object encircles the zenith/nadir if (phi >= 0) { # by using >= we demonstrate a N hemisphere bias return NearBranch(NaPA, x) } else { return NearBranch(NaPA - BrSign * PI, x) } } else if ( delta < -abs(phi) ) { # the object is too far south to encircle the local vertical return NearBranch(NaPA + HA, x) } }
NaPA = EquPA - (NaSign * h) - VA
The pseudo-code which chooses the branch nearest to EquPA is then
CorrectNaPA(x) # x is the exact NaPA which is uncertain by 2*n*PI { if ( delta > abs(phi) ) { # the object is too far north to encircle the local vertical return NearBranch(EquPA + HA + BrSign * PI, x) } else if ( abs(delta) <= abs(phi) ) { # the diurnal motion of the object encircles the zenith/nadir if (phi >= 0) { # by using >= we demonstrate a N hemisphere bias return NearBranch(EquPA, x) } else { return NearBranch(EquPA + BrSign * PI, x) } } else if ( delta < -abs(phi) ) { # the object is too far south to encircle the local vertical return NearBranch(Sky - HA, x) } }
Warning: Next two equations not verified.
dh -cos(phi) * cos(delta) * sin(HA) ----- = -------------------------------- d(HA) sqrt(1 - sin(h)**2)and
d(VA) cos(phi) * ( cos(HA) * sin(phi) * cos(delta) - cos(phi) * sin(delta) ) ------ = ---------------------------------------------------------------------- d(HA) 1 - sin(h)**2