For each point, the 3 quantities of Eqs.
to
are computed (variables cosr,
sinrsinp, and sinrcosp):
Neither
nor
are computed. Instead, the scaling factor
(variable expr) is
computed from Eq.
as:
 |
(55) |
and the projection plane coordinates are obtained by applying the
rotation by the projection angle to
:
which is equivalent to Eqs.
and
. The
cosine and sine of the projection angle (variables cpang and
spang) are computed once before the loop on the points. The
reasons for this formulation are:
- computing
would lose accuracy close to
the reference point, where the absolute error on
is about
,
being the double
precision relative accuracy. Angular distances below
rad (3 mas) can not be
resolved, and the error is still 2% at 10 mas. Using
and
directly preserves the double precision relative accuracy close to
the reference point, and the reference point is projected exactly at
without any special case;
- the expression
suffers from cancellation close to the
antipode, where the relative error on
is about
. In the far hemisphere, the equivalent
expression
is
used instead, with a relative error about
. Both
expressions are equal to 2 and well conditioned at the switch point
(
);
- at the exact antipode (
and
), the position
can not be projected and its direction is undefined. By convention,
the point is sent at the distance
radians towards the
North, i.e.
before rotation.