The projected separation is
Rotating the projected coordinates through gives components along the nodal line and perpendicular to it. The position angle is therefore most safely written with the quadrant-preserving function
or, wherever the corresponding tangent is finite,