We should include warnings for any attempt to initialize a quaternion, or compute equatorial, for abs(dec) > 89.99999. Below that it seems to be numerically stable.
The transforms to and from equatorial are numerically unstable for abs(dec) very near 90:
Teasing out the exact numerical problem is a little tricky, but for the q4.equatorial statement I include debug print statements in _quat2equatorial and got:
We should include warnings for any attempt to initialize a quaternion, or compute equatorial, for
abs(dec) > 89.99999
. Below that it seems to be numerically stable.The transforms to and from equatorial are numerically unstable for
abs(dec)
very near 90:Teasing out the exact numerical problem is a little tricky, but for the
q4.equatorial
statement I include debug print statements in_quat2equatorial
and got:So basically
ra = atan2(0, 0)
androll = atan2(0, 0)
.