Wrong singularity point in DivertedSingularityAiming
A bug was found while discussing this forum thread.
The singularity point computed in constructor of DivertedSingularityAiming
is wrong due to an Hipparchus bug (see here).
Final fix will be to wait until Hipparchus issue is fixed and new version is available.
Temporary fix is to replace:
final S2Point outside = forbiddenZone.getEnclosingCap().getCenter().negate();
With:
// Center point of the enclosing cap
final S2Point center = forbiddenZone.getEnclosingCap().getCenter();
// Opposite point on the sphere
final S2Point outside = new S2Point(MathUtils.normalizeAngle(center.getTheta() + FastMath.PI, FastMath.PI), FastMath.PI - center.getPhi());
In constructor of DivertedSingularityAiming
.